Getting InvalidSignatureException: Forbidden Error When deployed my dockerized Pinpoint Application on EC2.


I have built an app that creates pinpoint endpoints using aws-sdk and it's working perfectly in my local machine and local docker container but when i deployed the same application on EC2 using docker it's giving me this "Forbidden" Error. why? i mean if it's working fine locally it should work live as well.

const AWS = require('aws-sdk');

    secretAccessKey: process.env.AWS_SECRET_ACCESS,
    accessKeyId: process.env.AWS_ACCESS_KEY,
    region: 'ap-southeast-2',

const pinpoint = new AWS.Pinpoint();
pinpoint.updateEndpoint(params, function (err, data) {
              if (err) {
      'An error occurred.\n');
      , err.stack);
              } else {
                  '>> Endpoint added/pushed Successfully with endpoint ID ' + obj_id
asked 3 months ago34 views
1 Answer


Its possible that a different IAM entity is being made use of to perform the API call. When the SDK for JavaScript loads, it automatically searches the shared credentials file, which is named "credentials"[1]. Here is the precedence order for NodeJS applications[2]. To find out the identity of the caller, try a GetCallerIdentity call[3] to log the IAM identity making the call on your instance/application.

[1] [2] [3]

Feel free to raise a support case with the IAM team to perform resource specific troubleshooting. Thanks!

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions