Reputation: 1362
To perform some action on Cognito on my dev environment I need to have: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY so I set them as environment variables. On the staging server I didn't set it and app works, so I assume it should be added automatically by EB or EC2 or anything else. Where can I find it and change?
Upvotes: 2
Views: 1691
Reputation: 81356
You do not want to store credentials on your instance. Instead use IAM roles.
For Elastic Beanstalk look into Instance Profiles and Service Roles. This link will help you put everything inplace.
An instance profile is a container for an AWS Identity and Access Management (IAM) role that you can use to pass role information to an EC2 instance when the instance starts. When you launch an environment in the AWS Elastic Beanstalk environment management console, the console creates a default instance profile, called aws-elasticbeanstalk-ec2-role, and assigns managed policies with default permissions to it.
Using Elastic Beanstalk with AWS Identity and Access Management
Upvotes: 1