
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
According to security best practices, how should an Amazon EC2 instance be given access to an Amazon S3 bucket?
A
Hard code an IAM user's secret key and access key directly in the application, and upload the file.
B
Store the IAM user's secret key and access key in a text file on the EC2 instance, read the keys, then upload the file.
C
Have the EC2 instance assume a role to obtain the privileges to upload the file.
D
Modify the S3 bucket policy so that any service can upload to it at any time.
Explanation:
Using IAM roles for EC2 instances is the AWS security best practice for granting access to AWS services like S3. Here's why:
This approach follows AWS security best practices and eliminates credential management overhead.