Amazon DOP-C02 AWS DevOps Engineer Professional (DOP-C02) Free Practice Test — 30 Questions

Exam Code: DOP-C02

30 questions · Full explanations · No account required

Free
Question 1 of 30

In a scenario where a company is using AWS CDK to deploy a serverless application, the development team needs to create a Lambda function that processes incoming data from an S3 bucket. They want to ensure that the Lambda function has the necessary permissions to read from the S3 bucket and log its activities to CloudWatch. Which of the following approaches would best achieve this while adhering to the principle of least privilege?

Create an IAM role for the Lambda function that grants it permissions to read from the specific S3 bucket and write logs to CloudWatch, and attach this role to the Lambda function during its creation in the CDK stack.
Assign the Lambda function the AWS managed policy for S3 access, which grants broad permissions to all S3 buckets, and use the default logging permissions for Lambda functions.
Use an inline policy directly attached to the Lambda function that allows access to all S3 buckets and CloudWatch logs, ensuring that the function can operate without restrictions.
Create a separate IAM user with S3 and CloudWatch permissions and invoke the Lambda function using this user's credentials to maintain security.

About the Amazon DOP-C02 AWS DevOps Engineer Professional (DOP-C02) Certification

These free practice questions are designed to help you assess your readiness for the Amazon DOP-C02 AWS DevOps Engineer Professional (DOP-C02) exam by Amazon. Each question comes with a detailed explanation to reinforce the correct concept. For a complete exam preparation experience with hundreds of questions, spaced-repetition study tools, and full exam simulations, explore our premium access.