I have a nodejs application which uses AWS SDK for JavaScript v3 client-dynamodb
. The application is deployed to an AWS beanstalk environment where I have created two environment properties for AWS_Access_key_ID and AWS_Secret_access_key. The documentation says:
The SDK automatically detects AWS credentials set as variables in your environment and uses them for SDK requests. This eliminates the need to manage credentials in your application
However, the deployed application can't seem to detect the env variables automatically. Using v2, I did not have this problem as I could programatically provide the access key and access ID as configs after reading them from the process.env
, but in v3 there doesn't seem to be a way to do that.
I also do not want to mess with the EC2 instance manually as I have a code pipeline which updates the beanstalk on every push to the repo and everything is managed automatically.
Any suggestions? I thought of adding my env. variables to the YAML file which is used when building the environment but I am not sure how those variables would differ from the beanstalk env. variables.