2

We are using AWS CPP SDK for download/upload from Amazon S3 , Its working fine for our lower environment but getting below error on while accessing buckets for one particular environment,

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>F1CEBCDCAB623E08</RequestId>
<HostId> 
  fAVPSqbWgBKqnr1cos13mkoqUm9/NQ2s4rrGnXbdyldYqjYPOx+OBM90qQXkYB2fVOJD3hP4DaE= 
</HostId> 
</Error>

we have cross verified IAM ROLE but nothing worked out.

Any help here appreciated.

Thanks.

1 Answers1

1

The error means that the AWS AccessKey that you are using does not have rights for the operation that you are performing.

1) If you are running this code on an EC2 instance, a) create an IAM role with the correct permissions, b) assign this role to the EC2 instance.

2) If you are running this code outside of AWS, then you need to review the IAM user's AccessKey for correct permissions (policy).

You mention role, so I am assuming #1 above. Verify that you have assigned this role to the EC2 instance in the AWS EC2 console.

John Hanley
  • 74,467
  • 6
  • 95
  • 159