Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when Ec2 running as a role tries to get a Session Token in AWS

I'm running a app on an EC2 using a role with the the permissions:

"sts:GetSessionToken",
"sts:AssumeRole"

When I try to obtain temporary credentials using that role, I get the error:

Cannot call GetSessionToken with session credentials (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied;

Am I missing one or more permissions for the role to be able to obtain temporary session credentials?

like image 597
Todd Avatar asked Mar 08 '16 16:03

Todd


1 Answers

According to AWS support, roles cannot request temporary credentials. Only actual Users can do that.

A work around is to use the role's credentials. They get rolled over every hour, so they are temporary (albeit hard coded to 1 hour TTL)

like image 71
Todd Avatar answered Sep 28 '22 08:09

Todd