Closed marcossv9 closed 2 years ago
Interesting -
Something which stands out to me is the line credentials resolved from config ini profile
- that means that your ~/.aws/config
file's section under the profile [sandbox]
has a valid configuration for loading directly from the config file (i.e. a key, secret and maybe session token). Because of this, the plugin is using those credentials (which seem to be invalid) instead of using SSO.
On the assumption that you do want to use this plugin to handle your SSO, can you make sure your config only has the following sections under the profile you want to use (from https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html):
[profile my-dev-profile]
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_region = us-east-1
sso_account_id = 123456789011
sso_role_name = readOnly
region = us-west-2
output = json
Let me know how you get on 😄
Hey @thomasmichaelwallace, thanks for your suggestion.
I checked my config file for the profile I'm using, and looks good:
[profile sandbox]
sso_start_url = https://d-XXXXXXX.awsapps.com/start#/
sso_region = us-east-2
sso_account_id = XXXXXXXX
sso_role_name = MyRole
region = us-east-2
output = json
Not sure why the plugin didn't work in my end, but I ended up using this npm package that solved my issue.
No worries - the best I can do is that it still works for me on our legacy stack.
Although- probably worth mentioning that the aws-cdk isn't as bad as it used to be, and supports SSO out of the box.
Describe the bug When running
serverless deploy
using the plugin in Linux (Ubuntu 20.04.1) I get the following error and I can't deploy to the environment:To Reproduce Steps to reproduce the behavior:
export AWS_SDK_LOAD_CONFIG=1
aws sso login
serverless deploy
Expected behavior Serverless App get deployed in the AWS environment.
Screenshots
Desktop (please complete the following information):
Additional context Can this be an issue related to Linux OS?