ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 254 - SCS-C02 discussion

Report
Export

A security engineer is trying to use Amazon EC2 Image Builder to create an image of an EC2 instance. The security engineer has configured the pipeline to send logs to an Amazon S3 bucket. When the security engineer runs the pipeline, the build fails with the following error: ''AccessDenied: Access Denied status code: 403''.

The security engineer must resolve the error by implementing a solution that complies with best practices for least privilege access.

Which combination of steps will meet these requirements? (Choose two.)

A.
Ensure that the following policies are attached to the IAM role that the security engineer is using: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore.
Answers
A.
Ensure that the following policies are attached to the IAM role that the security engineer is using: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore.
B.
Ensure that the following policies are attached to the instance profile for the EC2 instance: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore.
Answers
B.
Ensure that the following policies are attached to the instance profile for the EC2 instance: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore.
C.
Ensure that the AWSImageBuilderFullAccess policy is attached to the instance profile for the EC2 instance.
Answers
C.
Ensure that the AWSImageBuilderFullAccess policy is attached to the instance profile for the EC2 instance.
D.
Ensure that the security engineer's IAM role has the s3:PutObject permission for the S3 bucket.
Answers
D.
Ensure that the security engineer's IAM role has the s3:PutObject permission for the S3 bucket.
E.
Ensure that the instance profile for the EC2 instance has the s3:PutObject permission for the S3 bucket.
Answers
E.
Ensure that the instance profile for the EC2 instance has the s3:PutObject permission for the S3 bucket.
Suggested answer: B, E

Explanation:

The most likely cause of the error is that the instance profile for the EC2 instance does not have the s3:PutObject permission for the S3 bucket. This permission is needed to upload logs to the bucket. Therefore, the security engineer should ensure that the instance profile has this permission.

One possible solution is to attach the AWSImageBuilderFullAccess policy to the instance profile for the EC2 instance. This policy grants full access to Image Builder resources and related AWS services, including the s3:PutObject permission for any bucket with ''imagebuilder'' in its name. However, this policy may grant more permissions than necessary, which violates the principle of least privilege.

Another possible solution is to create a custom policy that only grants the s3:PutObject permission for the specific S3 bucket that is used for logging. This policy can be attached to the instance profile along with the other policies that are required for Image Builder functionality: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore. This solution follows the principle of least privilege more closely than the previous one.

Ensure that the following policies are attached to the instance profile for the EC2 instance: EC2InstanceProfileForImageBuilder, EC2InstanceProfileForImageBuilderECRContainerBuilds, and AmazonSSMManagedInstanceCore.

Ensure that the instance profile for the EC2 instance has the s3:PutObject permission for the S3 bucket. This can be done by either attaching the AWSImageBuilderFullAccess policy or creating a custom policy with this permission.

1:Using managed policies for EC2 Image Builder - EC2 Image Builder2:PutObject - Amazon Simple Storage Service3:AWSImageBuilderFullAccess - AWS Managed Policy

asked 16/09/2024
Suraj Patil
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first