ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 165 - DVA-C02 discussion

Report
Export

A developer designed an application on an Amazon EC2 instance The application makes API requests to objects in an Amazon S3 bucket

Which combination of steps will ensure that the application makes the API requests in the MOST secure manner? (Select TWO.)

A.
Create an IAM user that has permissions to the S3 bucket. Add the user to an 1AM group
Answers
A.
Create an IAM user that has permissions to the S3 bucket. Add the user to an 1AM group
B.
Create an IAM role that has permissions to the S3 bucket
Answers
B.
Create an IAM role that has permissions to the S3 bucket
C.
Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.
Answers
C.
Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.
D.
Create an 1AM role that has permissions to the S3 bucket Assign the role to an 1AM group
Answers
D.
Create an 1AM role that has permissions to the S3 bucket Assign the role to an 1AM group
E.
Store the credentials of the IAM user in the environment variables on the EC2 instance
Answers
E.
Store the credentials of the IAM user in the environment variables on the EC2 instance
Suggested answer: B, C

Explanation:

IAM Roles for EC2: IAM roles are the recommended way to provide AWS credentials to applications running on EC2 instances. Here's how this works:

You create an IAM role with the necessary permissions to access the target S3 bucket.

You create an instance profile and associate the IAM role with this profile.

When launching the EC2 instance, you attach this instance profile.

Temporary Security Credentials: When the application on the EC2 instance needs to access S3, it doesn't directly use access keys. Instead, the AWS SDK running on the instance retrieves temporary security credentials associated with the role. These are rotated automatically by AWS.

IAM Roles for Amazon EC2:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html

Temporary Security Credentials:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html

asked 16/09/2024
Débora Gomes Almeida
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first