Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Cloud Practitioner CLF-C02 All Questions

View all questions & answers for the AWS Certified Cloud Practitioner CLF-C02 exam

Exam AWS Certified Cloud Practitioner CLF-C02 topic 1 question 4 discussion

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.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
TheFivePips
Highly Voted 8 months ago
Selected Answer: C
The recommended security best practice for giving an Amazon EC2 instance access to an Amazon S3 bucket is option C: Have the EC2 instance assume a role to obtain the privileges to upload the file. This involves using AWS Identity and Access Management (IAM) roles to grant temporary permissions to the EC2 instance, rather than hard-coding or storing access keys directly in the application or on the instance. This approach enhances security by minimizing the exposure of long-term credentials and following the principle of least privilege. The EC2 instance assumes a role with specific permissions to interact with the S3 bucket, and AWS automatically rotates temporary credentials for the instance. Options A and B involve storing IAM user's secret keys on the EC2 instance, which is not recommended due to security risks. Option D, modifying the S3 bucket policy to allow any service to upload to it at any time, is also not recommended as it may lead to security vulnerabilities and compromises the principle of least privilege.
upvoted 6 times
...
[Removed]
Most Recent 1 week, 2 days ago
Selected Answer: C
C is perfect answer.
upvoted 1 times
...
chalaka
4 months, 2 weeks ago
Selected Answer: C
C. Have the EC2 instance assume a role to obtain the privileges to upload the file. Using IAM roles and granting EC2 instances permissions to assume these roles is the best practice for managing access to AWS resources securely. By assigning an IAM role to the EC2 instance and configuring the necessary permissions in the role's policy, you can ensure that the EC2 instance has the appropriate permissions to access the S3 bucket without the need to hard code or store sensitive credentials on the instance. This approach follows the principle of least privilege and enhances security by reducing the risk of exposure of access keys or secrets
upvoted 1 times
...
chalaka
4 months, 4 weeks ago
Selected Answer: C
C. Have the EC2 instance assume a role to obtain the privileges to upload the file. is correct.
upvoted 1 times
...
C. Have the EC2 instance assume a role to obtain the privileges to upload the file. Using IAM roles to grant permissions to EC2 instances is a more secure and manageable method compared to hard coding or storing access keys directly on the instance. By assigning an IAM role to the EC2 instance, you can define the necessary permissions for accessing the S3 bucket without exposing any sensitive credentials. This follows the principle of least privilege, ensuring that the EC2 instance only has the permissions it needs to perform its intended tasks, enhancing overall security posture.
upvoted 3 times
...
Ruffyit
7 months, 3 weeks ago
The recommended security best practice for giving an Amazon EC2 instance access to an Amazon S3 bucket is option C: Have the EC2 instance assume a role to obtain the privileges to upload the file. This involves using AWS Identity and Access Management (IAM) roles to grant temporary permissions to the EC2 instance, rather than hard-coding or storing access keys directly in the application or on the instance.
upvoted 2 times
...
Vasisht
8 months, 4 weeks ago
Selected Answer: C
Option C is correct
upvoted 2 times
...
ohoong
9 months, 1 week ago
Selected Answer: C
yes C is correct
upvoted 1 times
...
Nepton
10 months ago
Have the EC2 instance assume a role to obtain the privileges to upload the file.
upvoted 1 times
...
lunamuller
10 months, 3 weeks ago
Selected Answer: C
Answer is C.
upvoted 1 times
...
ASDFDSAFDFA
10 months, 4 weeks ago
Selected Answer: C
C obviously
upvoted 1 times
...
parrtner73
11 months, 1 week ago
Selected Answer: C
C is the correct one
upvoted 1 times
...
Anyio
11 months, 1 week ago
Selected Answer: C
You definitely need a role to access the S3 bucket as best practice! https://repost.aws/knowledge-center/ec2-instance-access-s3-bucket#
upvoted 2 times
...
Rotimija
11 months, 2 weeks ago
C is correct
upvoted 2 times
...
ShivaNagarajan
11 months, 2 weeks ago
Selected Answer: D
https://repost.aws/knowledge-center/ec2-instance-access-s3-bucket#
upvoted 4 times
Anyio
11 months, 1 week ago
You mean C dude!
upvoted 6 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...