-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use temporary security credentials #4970
Comments
Hey @DewaldDeJager, I'm not able to replicate this issue. Here's what I did to create a new app:
The initialization completed successfully for me. Is there a chance that the sso session lifespan is set to a low number and the credential was expired? I'm not sure what would be different between our setups. perhaps the administratoraccess role, but that wouldn't explain an expired session token error. |
I think I'm running into this same issue. AWS SSO was working fine for me yesterday until I upgraded Copilot and the AWS CLI. Here are my current versions: I can use the aws CLI fine still to access services, but I always get this error from copilot no matter how many times I
|
Here's the SSO setup that worked for me with v1.28.0
I've been prefixing my copilot commands with |
Thanks! I'll give that a shot today |
Hmm, This is quite annoying. It worked for me with aws-cli version |
|
@DewaldDeJager @normand1 You might also be getting hit by this confusion with new vs old SSO sessions, summarized in this reddit post. Basically you may have to configure a "legacy" SSO profile since Copilot is still using the aws-sdk-go v1, which doesn't support new-style SSO sessions yet. That may be what's happening here. related to #4359 |
Looks like my issue has been resolved at least, might have just needed for something in the cache to expire. I definitely haven't done anything I would have expected to fix it, but it's working now. |
Closing as aws-sdk-go v1 recently updated to support the new SSO sessions, and was released in Copilot v1.29. Let us know if there are still any issues! |
Description
I am unable to use the CLI with a profile with temporary security credentials. I am using AWS SSO with an external identity provider. In the
~/.aws/config
file I have:After running
aws --profile sandbox sso login
temporary credentials are added to the~/.aws/credentials
file:And then to confirm it is working I run:
export AWS_PROFILE=sandbox aws sts get-caller-identity
Which works as expected:
Expected Behaviour
When running
copilot init --app my-app
I should get this output:Actual Behaviour
When running
copilot init --app my-app
I get this error:Additional Information
I have tried using the
default
profile instead of the named profilesandbox
but the behaviour was the same. The only way I could get it to work was by creating an IAM user in that account and generating access keys. This is not as secure as using temporary credentials.OS: macOS Ventura (13.3.1)
Copilot CLI: v1.28.0
AWS CLI: aws-cli/2.11.25 Python/3.11.3 Darwin/22.4.0 exe/x86_64 prompt/off
The text was updated successfully, but these errors were encountered: