2

I've successfully added an AWS Role to an EC2 instance. When I ssh into the instance and curl http://169.254.169.254/latest/meta-data/iam/security-credentials/, I can see the temporary credentials just fine.

On this EC2 instance, I have an NGINX reverse proxy serving a NodeJs web app. I want to be able to access DynamoDB in the Javascript of the web app but the AWS.config.credentials are null.

From what I've read, shouldn't these credentials be loaded automatically since the role was applied to the EC2 instance?

Is there some way to pass those credentials into the web app that I'm missing?

DynamoDB is being setup like this:

private dynamoDB = new AWS.DynamoDB();
private dynamoDBClient = new AWS.DynamoDB.DocumentClient({ service: this.dynamoDB, convertEmptyValues: true });
DranoMax
  • 474
  • 4
  • 18

0 Answers0