I got a problem using IAM roles.
I launched instances using Cloudformation template where i specified my role and policies to access s3 bucket and other amazon resources. After launching the script successfully fetches required resources from s3.
However I've launched my downloaded scripts that use boto3 as sdk and i got an error; Boto failed to load credentials
(as I understand it can load credentials either from aws credentials files or from IAM role.
Then I run aws s3 ls
to check the problem and also got the same problem. Also I tested my role using policysim
(S3ListAllMyBucketsnot
, S3ListAllMyBucketsnot
) and figured out that everything is okay.
Amazon S3ListBucketnot required * allowed 1 matching statements.
Amazon S3ListAllMyBucketsnot required * allowed 1 matching statements.
It should be noted that I've played around with cloudformation the whole day and launched pretty must instances (but shutdown them). Could it be a limitation issue?
Any solutions?
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
set? Check my answer in: stackoverflow.com/questions/41621353/… – helloV