Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
aws loginがいいぞ / aws login is good
Search
める
August 03, 2026
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
aws loginがいいぞ / aws login is good
2026/07/31 Gov-JAWS x JAWS-UG 名古屋での通常LT内容です。
める
August 03, 2026
Transcript
14 slides
aws loginがいいぞ! める(@mel________27) 2026/07/31 JAWS -UG 名古屋/Gov-JAWS
Who am I? 名前:める(@mel________27) 所属:三重県の自治体関連某SIer 業務:インフラエンジニア 好きなサービス:AWS Cloud9、AWS CloudShell、AWS IAM
AWS CLIのログイン、どうしてますか? ・ CloudShellでのログイン ・プロファイルを用いた認証情報 ◦ アクセスキー ◦ SSOの認証情報 ⇒
それぞれconfigに記載する必要がある
自分たちのこれまで ログインは「aws sso login」コマンドでプロファイルオプションを指定して実行 # aws sso login –profile ${PROFILE_NAME}
.aws/config にプロファイルを記載して対応 → アカウント/ロールが増えたりするたびに追加する必要がある 他の作業者についても、同じようにプロファイルを記載してもらう必要がある → まず最初に「プロファイルの設定」が作業者個別に必要になる → .aws/config の認証情報は別に作業の本質ではない
.aws/configの例 下記のようなconfigを組織/アカウント/ロールごとに書く [profile sample] sso_session = sample-sso sso_account_id = 111111111111
sso_role_name = SwitchOnlyRole region = ap-northeast-1 output = json [profile sample_readonly] sso_session = sample-sso sso_account_id = 111111111111 role_arn=arn:aws:iam::111111111111:role/ReadOnlyRole source_profile=sample region = ap-northeast-1 output = json [sso-session sample-sso] sso_start_url = https://d-xxxxxxxxxx.awsapps.com/start/# sso_region = ap-northeast-1 sso_registration_scopes = sso:account:access
aws loginがきた! 2025/11 aws cli v2.32.0 以降で「aws login」コマンドが追加された 「aws login」コマンドを実行し、ブラウザベースで認証することで、
異なるアカウントへのログインやスイッチロール先でのログインができるようになった ⇒ スイッチロールはブラウザの認証に任せられる!! aws cliとしてはaws loginをするだけ
実際の動作 ① ブラウザ側で必要な画面にスイッチロールする
実際の動作 ②aws login を実行
実際の動作 ③ 表示されたURLにブラウザでアクセスし、「アクティブなセッションで続行」を押す ※wslを使っているのでURLコピペしてますが、通常はブラウザが起動する
実際の動作 ④ 下記が表示されたら、ターミナルに戻る ⑤ ターミナルに戻るとデフォルトプロファイルが設定されている
profileオプション --profile オプションでプロファイルを指定した切り替えも可能 > 同一ターミナルで複数セッションを切り替えたいときなど?
注意事項 ポリシー「SignInLocalDevelopmentAccess」がないとaws loginでの接続時にエラーになる 実際はポリシー内の「signin:AuthorizeOAuth2Access」「signin:CreateOAuth2Token」が必要
【追加】aws updateがきた! 2026/07 aws cli v2.36.0 以降で「aws update」コマンドが追加された これまではAWS CLIのアップデートについて、下記のようなスクリプトを作成し、
新機能が必要になったタイミング(aws loginの追加など)で定期的に実行していた。 cd /tmp curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip“ unzip -q awscliv2.zip sudo ./aws/install –update ⇒ sudo aws update コマンドで実行できるようになった!(これも便利)
まとめ 運用負荷(事前設定の負荷)が減るアップデートはうれしい! アップデートは積極的に追っていき、作業の軽減をしたい。 AWS CLIはいいぞ! → と言い続けるために、実行環境構築の負担をなくしたい
More Decks by める
See All by める
AWSをCLIで理解したい! / I want to understand AWS using the CLI
mel_27
2
1.5k
AWS ドキュメントをあるいてみた / Walk on AWS documents
mel_27
0
230
Amazon FSx for ONTAPを 試してみた / Try Amazon FSx for ONTAP
mel_27
0
1k
AWS Directory ServiceとFSxをCLIでさわってみた / AWS Directry Service and FSx for Windows Server
mel_27
0
650
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
The SEO identity crisis: Don't let AI make you average
varn
0
630
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Balancing Empowerment & Direction
lara
6
1.4k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Visualization
eitanlees
153
17k
How STYLIGHT went responsive
nonsquared
100
6.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Ruling the World: When Life Gets Gamed
codingconduct
0
450
Automating Front-end Workflow
addyosmani
1370
210k
Building AI with AI
inesmontani
PRO
1
1.4k