Support instance profile credentials via ec2 metadata service, like aws cli
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m attempting to run the amplify cli on a Jenkins worker, which gets its credentials from its instance profile, not from a ~/.aws/credentials or ~/.aws/config file. I can run aws s3 ls
and other aws cli commands just fine, but when I run amplify init
, it says “AWS access credentials can not be found.”
Describe the solution you’d like
amplify
should work automagically just like the aws cli 😃
Describe alternatives you’ve considered Per these docs I could fetch the credentials via the AWS STS API, but that’s a bit of a pain.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Using credentials for Amazon EC2 instance metadata
Each Amazon EC2 instance contains metadata that the AWS CLI can directly query for temporary credentials. When an IAM role is attached to...
Read more >AWS CLI using Instance Profile Credentials - Stack Overflow
Instance profile credentials – these credentials can be used on EC2 instances with an assigned instance role, and are delivered through the ...
Read more >How do AWS CLI credential and IAM role for EC2 work?
Like mentioned in the above page, you're usually navigated to use aws configure command to set up your configuration to use the AWS...
Read more >Using credentials for Amazon EC2 instance metadata
Each Amazon EC2 instance contains metadata that the Amazon CLI can directly query for temporary credentials. When an IAM role is attached to...
Read more >Authenticating to AWS with Instance Metadata - Gruntwork Blog
Part of the information available in EC2 Metadata are Temporary Access Keys that are automatically provided and rotated by AWS! The permissions ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you configured your EC2 instance to use IAM roles, the Amplify CLI can automatically assume the IAM credentials for your application, eliminating the need to manually provide credentials. This can be done in two ways:
amplify init
in headless mode and set the awscloudformation provider’s configuration level to begeneral
, see hereamplify configure project
, and when promptedDo you want to update or remove the project level configuration
, selectremove
. The cli will then automatically assume the EC2 role for your project.This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.