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
71
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
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
990
AWS Directory ServiceとFSxをCLIでさわってみた / AWS Directry Service and FSx for Windows Server
mel_27
0
650
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
510
30 Presentation Tips
portentint
PRO
1
460
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
ラッコキーワード サービス紹介資料
rakko
5
5.7M
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
560
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
650
Building an army of robots
kneath
307
47k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Transcript
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はいいぞ! → と言い続けるために、実行環境構築の負担をなくしたい