Free AWS Certified Developer - Associate DVA-C02 Exam Braindumps
AWS Certified Developer - Associate DVA-C02 Questions 281–285 (page: 58)

Updated On: 10-Feb-2026

A developer creates a static website for their department. The developer deploys the static assets for the website to an Amazon S3 bucket and serves the assets with Amazon CloudFront. The developer uses origin access control (OAC) on the CloudFront distribution to access the S3 bucket.
The developer notices users can access the root URL and specific pages but cannot access directories without specifying a file name. For example, /products/index.html works, but /products/ returns an error. The developer needs to enable accessing directories without specifying a file name without exposing the S3 bucket publicly.
Which solution will meet these requirements?

  1. Update the CloudFront distribution's settings to index.html as the default root object is set.
  2. Update the Amazon S3 bucket settings and enable static website hosting. Specify index.html as the Index document. Update the S3 bucket policy to enable access. Update the CloudFront distribution's origin to use the S3 website endpoint.
  3. Create a CloudFront function that examines the request URL and appends index.html when directories are being accessed. Add the function as a viewer request CloudFront function to the CloudFront distribution's behavior.
  4. Create a custom error response on the CloudFront distribution with the HTTP error code set to the HTTP 404 Not Found response code and the response page path to /index.html. Set the HTTP response code to the HTTP 200 OK response code.

Answer(s): C



A developer is testing a RESTful application that is deployed by using Amazon API Gateway and AWS Lambda. When the developer tests the user login by using credentials that are not valid, the developer receives an HTTP 405: METHOD_NOT_ALLOWED error. The developer has verified that the test is sending the correct request for the resource.
Which HTTP error should the application return in response to the request?

  1. HTTP 401
  2. HTTP 404
  3. HTTP 503
  4. HTTP 505

Answer(s): A



A developer must use multi-factor authentication (MFA) to access data in an Amazon S3 bucket that is in another AWS account.
Which AWS Security Token Service (AWS STS) API operation should the developer use with the MFA information to meet this requirement?

  1. AssumeRoleWithWebIdentity
  2. GetFederationToken
  3. AssumeRoleWithSAML
  4. AssumeRole

Answer(s): D



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? (Choose two.)

  1. Create an IAM user that has permissions to the S3 bucket. Add the user to an IAM group.
  2. Create an IAM role that has permissions to the S3 bucket.
  3. Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.
  4. Create an IAM role that has permissions to the S3 bucket. Assign the role to an IAM group.
  5. Store the credentials of the IAM user in the environment variables on the EC2 instance.

Answer(s): B,C



An AWS Lambda function requires read access to an Amazon S3 bucket and requires read/write access to an Amazon DynamoDB table. The correct IAM policy already exists.
What is the MOST secure way to grant the Lambda function access to the S3 bucket and the DynamoDB table?

  1. Attach the existing IAM policy to the Lambda function.
  2. Create an IAM role for the Lambda function. Attach the existing IAM policy to the role. Attach the role to the Lambda function.
  3. Create an IAM user with programmatic access. Attach the existing IAM policy to the user. Add the user access key ID and secret access key as environment variables in the Lambda function.
  4. Add the AWS account root user access key ID and secret access key as encrypted environment variables in the Lambda function.

Answer(s): B



Viewing page 58 of 113
Viewing questions 286 - 290 out of 610 questions


Post your Comments and Discuss Amazon AWS Certified Developer - Associate DVA-C02 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!