AWS CLI v2 Preview with AWS SSO

 
 

​ A few days ago AWS annouced the AWS CLI v2 Preview with support for AWS SSO. Sounds promising, however it could be that you have issues validating your device during the aws configure sso stage. When you get to the following step: ​

Attempting to automatically open the SSO authorization page in your default browser.
​
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
​
https://device.sso.{AWS::Region}.amazonaws.com/
​
​
Then enter the code:

​ You may get the following error: ​

* Unexpected Error *
* TypeError: Failed to fetch *

This is because your Content Security Policy isn't set up correctly in your browser. To resolve the issue you need to do the following: ​

  • For Firefox you need to go to about:config and set security.csp.enable to false.
  • For Google Chrome you need to install the following plugin Disable Content-Security-Policy.

​​ The .aws/config file should look like this if everything was done correctly:

[profile my-profile]
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_region = {AWS::Region}
sso_account_id = 123456789012
sso_role_name = readOnly
region = {AWS::Region}
output = json

To use your Profile:

aws s3 ls --profile my-profile

or

export AWS_PROFILE=MyProfile


      

Berlin AWS User Group 2020/02

Berlin AWS Group Meetup - kindly hosted by globaldatanet

 

Feb 12th 2020

 

Dennis Nüsser

AWS Summit 2020 in Berlin

Meet exciting people, chat with experts, start collaborating - learn more about AWS!

 

Jan 31st 2020

 

Marc Schröter

Merry Christmas 2019

🎄Merry Christmas - Happy New Year 🎉

 

Dec 23rd 2019

 

David Krohn