Amazon AWS Certified Developer - Associate DVA-C02
Prev

There are 313 results

Next
#121 (Accuracy: 100% / 3 votes)
A developer creates an Amazon DynamoDB table. The table has OrderID as the partition key and NumberOfItemsPurchased as the sort key. The data type of the partition key and the sort key is Number.

When the developer queries the table, the results are sorted by NumberOfItemsPurchased in ascending order.
The developer needs the query results to be sorted by NumberOfItemsPurchased in descending order.

Which solution will meet this requirement?
  • A. Create a local secondary index (LSI) on the NumberOfItemsPurchased sort key.
  • B. Change the sort key from NumberOfItemsPurchased to NumberOfItemsPurchasedDescending.
  • C. In the Query operation, set the ScanIndexForward parameter to false.
  • D. In the Query operation, set the KeyConditionExpression parameter to false.
#122 (Accuracy: 100% / 2 votes)
A company runs a critical application on Amazon Elastic Container Service (Amazon ECS) by using Amazon EC2 instances. The company needs to migrate the application to Amazon ECS on AWS Fargate. A developer is configuring Fargate and the ECS capacity providers to make the change.

Which solution will meet these requirements with the LEAST downtime during migration?
  • A. Use the PutClusterCapacityProviders API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE as Provider 1 with a base value. Use FARGATE_SPOT as Provider 2 for failover.
  • B. Use the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE as Provider 1 with a base value. Use FARGATE_SPOT as Provider 2 for failover.
  • C. Use the PutClusterCapacityProviders API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE_SPOT as Provider 1 with a base value. Use FARGATE as Provider 2 for failover.
  • D. Use the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE_SPOT as Provider 1 with a base value. Use FARGATE as Provider 2 for failover.
#123 (Accuracy: 100% / 2 votes)
A developer has an application that uses an Amazon DynamoDB table with a configured local secondary index (LSI). During application testing, the DynamoDB table metrics report a ProvisionedThroughputExceededException error message. The number of requests made by the test suite did not exceed the table's provisioned capacity limits.

What is the cause of this issue?
  • A. The data in the table's partition key column is not evenly distributed.
  • B. The LSI's capacity is different from the table's capacity.
  • C. The application is not implementing exponential backoff retry logic while interacting with the DynamoDB API.
  • D. The application has the IAM permission to query the DynamoDB table but not to query the LSI.
#124 (Accuracy: 100% / 2 votes)
A company maintains a REST service using Amazon API Gateway and the API Gateway native API key validation. The company recently launched a new registration page, which allows users to sign up for the service. The registration page creates a new API key using CreateApiKey and sends the new key to the user. When the user attempts to call the API using this key, the user receives a 403 Forbidden error. Existing users are unaffected and can still call the API.

What code updates will grant these new users access to the API?
  • A. The createDeployment method must be called so the API can be redeployed to include the newly created API key.
  • B. The updateAuthorizer method must be called to update the API's authorizer to include the newly created API key.
  • C. The importApiKeys method must be called to import all newly created API keys into the current stage of the API.
  • D. The createUsagePlanKey method must be called to associate the newly created API key with the correct usage plan.
#125 (Accuracy: 100% / 2 votes)
A company has a web application that contains an Amazon API Gateway REST API. A developer has created an AWS CloudFormation template for the initial deployment of the application. The developer has deployed the application successfully as part of an AWS CodePipeline continuous integration and continuous delivery (CI/CD) process. All resources and methods are available through the deployed stage endpoint.

The CloudFormation template contains the following resource types:

• AWS::ApiGateway::RestApi
• AWS::ApiGateway::Resource
• AWS::ApiGateway::Method
• AWS::ApiGateway::Stage
• AWS::ApiGateway::Deployment

The developer adds a new resource to the REST API with additional methods and redeploys the template.
CloudFormation reports that the deployment is successful and that the stack is in the UPDATE_COMPLETE state. However, calls to all new methods are returning 404 (Not Found) errors.

What should the developer do to make the new methods available?
  • A. Specify the disable-rollback option during the update-stack operation.
  • B. Unset the CloudFormation stack failure options.
  • C. Add an AWS CodeBuild stage to CodePipeline to run the aws apigateway create-deployment AWS CLI command.
  • D. Add an action to CodePipeline to run the aws cloudfront create-invalidation AWS CLI command.
#126 (Accuracy: 100% / 2 votes)
A company has a serverless application that uses Amazon API Gateway backed by AWS Lambda proxy integration. The company is developing several backend APIs. The company needs a landing page to provide an overview of navigation to the APIs.

A developer creates a new/LandingPage resource and a new GET method that uses mock integration.


What should the developer do next to meet these requirements?
  • A. Configure the integration request mapping template with Content-Type of text/html and statusCode of 200. Configure the integration response mapping template with Content-Type of application/json. In the integration response mapping template, include the LandingPage HTML code that references the APIs.
  • B. Configure the integration request mapping template with Content-Type of application/json. In the integration request mapping template, include the LandingPage HMTL code that references the APIs. Configure the integration response mapping template with Content-Type of text/html and statusCode of 200.
  • C. Configure the integration request mapping template with Content-Type of application/json and statusCode of 200. Configure the integration response mapping template with Content-Type of text/html. In the integration response mapping template, include the LandingPage HTML code that references the APIs.
  • D. Configure the integration request mapping template with Content-Type of text/html. In the integration request mapping template, include the LandingPage HTML code that references the APIs. Configure the integration response mapping template with Content-Type of application/json and statusCode of 200.
#127 (Accuracy: 100% / 2 votes)
A developer is building an ecommerce application. When there is a sale event, the application needs to concurrently call three third-party systems to record the sale. The developer wrote three AWS Lambda functions. There is one Lambda function for each third-party system, which contains complex integration logic.

These Lambda functions are all independent.
The developer needs to design the application so each Lambda function will run regardless of others' success or failure.

Which solution will meet these requirements?
  • A. Publish the sale event from the application to an Amazon Simple Queue Service (Amazon SQS) queue. Configure the three Lambda functions to poll the queue.
  • B. Publish the sale event from the application to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the three Lambda functions to be triggered by the SNS topic.
  • C. Publish the sale event from the application to an Application Load Balancer (ALB). Add the three Lambda functions as ALB targets.
  • D. Publish the sale event from the application to an AWS Step Functions state machine. Move the logic from the three Lambda functions into the Step Functions state machine.
#128 (Accuracy: 100% / 4 votes)
A developer is publishing critical log data to a log group in Amazon CloudWatch Logs. The log group was created 2 months ago. The developer must encrypt the log data by using an AWS Key Management Service (AWS KMS) key so that future data can be encrypted to comply with the company's security policy.

Which solution will meet this requirement with the LEAST effort?
  • A. Use the AWS Encryption SDK for encryption and decryption of the data before writing to the log group.
  • B. Use the AWS KMS console to associate the KMS key with the log group.
  • C. Use the AWS CLI aws logs create-log-group command, and specify the key Amazon Resource Name (ARN).
  • D. Use the AWS CLI aws logs associate-kms-key command, and specify the key Amazon Resource Name (ARN).
#129 (Accuracy: 100% / 3 votes)
A developer is working on a web application that requires selective activation of specific features. The developer wants to keep the features hidden from end users until the features are ready for public access.

Which solution will meet these requirements?
  • A. Create a feature flag configuration profile in AWS AppSync. Store the feature flag values in the configuration profile. Activate and deactivate feature flags as needed.
  • B. Store prerelease data in an Amazon DynamoDB table. Enable Amazon DynamoDB Streams in the table. Toggle between hidden and visible states by using DynamoDB Streams.
  • C. Create a feature flag configuration profile in AWS AppConfig. Store the feature flag values in the configuration profile. Activate and deactivate feature flags as needed.
  • D. Store prerelease data in AWS Amplify DataStore. Toggle between hidden and visible states by using Amplify DataStore cloud synchronization.
#130 (Accuracy: 100% / 4 votes)
A developer is creating a simple proof-of-concept demo by using AWS CloudFormation and AWS Lambda functions. The demo will use a CloudFormation template to deploy an existing Lambda function. The Lambda function uses deployment packages and dependencies stored in Amazon S3. The developer defined an AWS::Lambda::Function resource in a CloudFormation template. The developer needs to add the S3 bucket to the CloudFormation template.

What should the developer do to meet these requirements with the LEAST development effort?
  • A. Add the function code in the CloudFormation template inline as the code property.
  • B. Add the function code in the CloudFormation template as the ZipFile property.
  • C. Find the S3 key for the Lambda function. Add the S3 key as the ZipFile property in the CloudFormation template.
  • D. Add the relevant key and bucket to the S3Bucket and S3Key properties in the CloudFormation template.