Courseiva
← Back to AWS Certified Developer Associate DVA-C02 questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise AWS Certified Developer Associate DVA-C02 practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
DVA-C02
exam code
Amazon Web Services
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related DVA-C02 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1easymultiple choice
Full question →

The exhibit shows the output of the describe-instances command. An Elastic Beanstalk environment is configured to use this EC2 instance as a web server. The application is not accessible. What is the most likely cause?

Network Topology
$ aws ec2 describe-instancesfilters Name=tag:NameRefer to the exhibit.```"Reservations": ["Instances": ["InstanceId": "i-1234567890abcdef0","State": {"Name": "terminated"},"Tags": ["Key": "Name","Value": "WebServer"
Question 2easymultiple choice
Full question →

Refer to the exhibit. A developer creates this CloudFormation template and tries to deploy it. The deployment fails with 'CREATE_FAILED' for the S3 bucket resource. What is the most likely cause?

Exhibit

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "MyBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketName": "my-app-data-12345"
      }
    }
  }
}
Question 3mediummultiple choice
Full question →

The exhibit shows an IAM policy attached to a user. The user reports being unable to upload files to S3 bucket 'my-bucket'. What is the MOST likely cause?

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*"
    },
    {
      "Effect": "Allow",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my-bucket/*"
    }
  ]
}
Question 4easymultiple choice
Full question →

Refer to the exhibit. A developer created this CloudFormation template for an S3 bucket. What is the expected behavior?

Exhibit

Refer to the exhibit.

Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      VersioningConfiguration:
        Status: Enabled
      LifecycleConfiguration:
        Rules:
          - Id: ExpireOldVersions
            Status: Enabled
            NoncurrentVersionExpirationInDays: 30
Question 5mediummultiple choice
Full question →

Refer to the exhibit. A developer attached the IAM policy to a Lambda function's execution role. The function reads items from a DynamoDB table that uses AWS KMS customer managed key (CMK) for encryption at rest. When the function tries to read an item, it receives an access denied error. What is the cause?

Exhibit

Refer to the exhibit.
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:PutItem"
      ],
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"
    },
    {
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt"
      ],
      "Resource": "*"
    }
  ]
}
Question 6mediummultiple choice
Full question →

Refer to the exhibit. A developer runs the AWS CLI command to invoke a Lambda function. The output shows StatusCode 200 and no FunctionError. However, the application that depends on this function's output is not working correctly. What should the developer check next?

Network Topology
$ aws lambda invokefunction-name my-functionpayload '{"key1":"value1"}' output.txtRefer to the exhibit."StatusCode": 200,"ExecutedVersion": "$LATEST","FunctionError": ""
Question 7easymultiple choice
Full question →

Refer to the exhibit. A developer created this CloudFormation template. After deployment, the stack creation fails with 'Bucket name already exists'. What should the developer do to fix the issue?

Exhibit

Refer to the exhibit.

Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Sub "${AWS::StackName}-bucket"
      VersioningConfiguration:
        Status: Enabled
  MyQueue:
    Type: AWS::SQS::Queue
    Properties:
      QueueName: !Sub "${AWS::StackName}-queue"
      SqsManagedSseEnabled: true
Question 8hardmultiple choice
Full question →

Refer to the exhibit. An IAM policy is attached to a user. The user tries to download an object from s3://my-bucket/secret/config.txt. What will happen?

Exhibit

Refer to the exhibit.

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::my-bucket/*"
        },
        {
            "Effect": "Deny",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::my-bucket/secret/*"
        }
    ]
}
```
Question 9hardmultiple choice
Full question →

Refer to the exhibit. An IAM policy is attached to an IAM user. The user tries to upload an object to s3://my-bucket/confidential/report.pdf. What is the outcome?

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    },
    {
      "Effect": "Deny",
      "Action": "s3:*",
      "Resource": "arn:aws:s3:::my-bucket/confidential/*"
    }
  ]
}
Question 10hardmultiple choice
Full question →

Refer to the exhibit. A developer runs an AWS CLI command on an EC2 instance and receives the error shown. The instance has an IAM role attached with the necessary permissions. What is the most likely cause of this error?

Exhibit

Error: Unable to locate credentials. You can configure credentials by running "aws configure".
Question 11hardmultiple choice
Full question →

Refer to the exhibit. A developer is troubleshooting a failed CodeDeploy deployment to an EC2 Auto Scaling group. The instance logs show that the 'BeforeInstall' script failed with exit code 1. What should the developer do to resolve the issue?

Exhibit

DeploymentId: d-EXAMPLE123
Status: FAILED
Error: The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available, or some instances in your deployment group are experiencing problems.

Instance logs:
i-abc12345: Script 'BeforeInstall' failed with exit code 1
Question 12mediummultiple choice
Full question →

Refer to the exhibit. A developer ran this CLI command and received the output shown. The application is retrieving the secret but getting an authentication error from the database. What is the MOST likely issue?

Network Topology
aws secretsmanager get-secret-valuesecret-id MySecret"ARN": "arn:aws:secretsmanager:us-east-1:123456789012:secret:MySecret-abc123","Name": "MySecret","VersionId": "abcd-1234","SecretString": "{\"username\":\"admin\",\"password\":\"P@ssw0rd\"}","VersionStages": ["AWSCURRENT"],"CreatedDate": 1620000000.0
Question 13easymultiple choice
Full question →

A developer uses the CloudFormation template in the exhibit to create an S3 bucket. The stack creation fails with the error 'Bucket already exists'. What is the MOST likely reason?

Exhibit

Refer to the exhibit.
```json
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "MyBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketName": "my-unique-bucket-name"
      }
    }
  }
}
```
Question 14hardmultiple choice
Full question →

The exhibit shows an IAM policy attached to a Lambda function's execution role. The function writes objects to an S3 bucket that is encrypted with a KMS key (the key specified in the policy). When the function tries to write an object, it receives an access denied error. What is the MOST likely missing permission?

Exhibit

Refer to the exhibit.

IAM policy JSON:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "S3Access",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::my-bucket/*"
        },
        {
            "Sid": "KMSDecrypt",
            "Effect": "Allow",
            "Action": "kms:Decrypt",
            "Resource": "arn:aws:kms:us-east-1:123456789012:key/abc123"
        }
    ]
}
Question 15mediummultiple choice
Full question →

The exhibit shows the output of invoking a Lambda function from the AWS CLI. The function returned a status code of 200 but included a FunctionError field set to 'Unhandled'. What does this indicate?

Network Topology
$ aws lambda invokefunction-name my-functionpayload '{"key": "value"}' response.jsonRefer to the exhibit.CLI command output:"StatusCode": 200,"FunctionError": "Unhandled","LogResult": "U1RBUlQgUmVxdWVzdElkOiA4ZjJhNjg2Yy1kM2I4LTExZTgtYjQ4OS1hYjA5M2U0ZjY4MzMgVmVyc2lvbjogJExBVEVTVApFTkQgUmVxdWVzdElkOiA4ZjJhNjg2Yy1kM2I4LTExZTgtYjQ4OS1hYjA5M2U0ZjY4MzMKUkVQT1JUIHJlcXVlc3RJZDogOGYyYTY4NmMtZDNiOC0xMWU4LWI0ODktYWIwOTNlNGY2ODMzCg=="

These DVA-C02 practice questions are part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style DVA-C02 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.

AWS Certified Developer Associate DVA-C02 Practice Questions | Courseiva