Why AWS.EC2MetadataCredentials giving wrong role?
问题 We have node service(V8.15.1) deployed on AWS EC2 containers using ECS.We have AWS_ACCESS_KEY setup in environment as well as a role is mapped to EC2 instances. I am supposed to use EC2 instance role to access AWS SSM. So, i tried below: AWS.config.credentials = new AWS.EC2MetadataCredentials(); and tried to read parameter from SSM. i get below error: { "msg": "User: arn:aws:sts::AccountID:assumed-role/role-name/i-*****92a is not authorized to perform: ssm:GetParameter on resource: arn:aws