DVA-C01 : AWS Certified Developer Associate : Part 19

  1. A company processes incoming documents from an Amazon S3 bucket. Users upload documents to an S3 bucket using a web user interface. Upon receiving files in S3, an AWS Lambda function is invoked to process the files, but the Lambda function times out intermittently.

    If the Lambda function is configured with the default settings, what will happen to the S3 event when there is a timeout exception?

    • Notification of a failed S3 event is send as an email through Amazon SNS.
    • The S3 event is sent to the default Dead Letter Queue.
    • The S3 event is processed until it is successful.
    • The S3 event is discarded after the event is retried twice.
  2. Which of the following are good use cases for how Amazon ElastiCache can help an application? (Choose two.)

    • Improve the performance of S3 PUT operations.
    • Improve the latency of deployments performed by AWS CodeDeploy.
    • Improve latency and throughput for read-heavy application workloads.
    • Reduce the time required to merge AWS CodeCommit branches.
    • Improve performance of compute-intensive applications.
  3. A developer has designed a customer-facing application that is running on an Amazon EC2 instance. The application logs every request made to it. The application usually runs seamlessly, but a spike in traffic generates several logs that cause the disk to fill up and eventually run out of memory. Company policy requires old logs to be centralized for analysis.

    Which long-term solution should the developer employ to prevent the issue from reoccurring?

    • Set up log rotation to rotate the file every day. Also set up log rotation to rotate after every 100 MB and compress the file.
    • Install the Amazon CloudWatch agent on the instance to send the logs to CloudWatch. Delete the logs from the instance once they are sent to CloudWatch.
    • Enable AWS Auto Scaling on Amazon Elastic Block Store (Amazon EBS) to automatically add volumes to the instance when it reaches a specified threshold.
    • Create an Amazon EventBridge (Amazon CloudWatch Events) rule to pull the logs from the instance. Configure the rule to delete the logs after they have been pulled.
  4. A developer is creating a serverless web application and maintains different branches of code. The developer wants to avoid updating the Amazon API Gateway target endpoint each time a new code push is performed.

    What solution would allow the developer to perform a code push efficiently, without the need to update the API Gateway?

    • Associate different AWS Lambda functions to an API Gateway target endpoint.
    • Create different stages in API Gateway, then associate API Gateway with AWS Lambda.
    • Create aliases and versions in AWS Lambda.
    • Tag the AWS Lambda functions with different names.
  5. A developer is building an AWS Lambda function that will dynamically generate and send a weekly newsletter to 100,000 users. This newsletter contains both static text and images. The developer needs a fast and highly scalable place to store the images that will be hyperlinked in the newsletter.

    Where should the developer store these images?

    • Use an Amazon DynamoDB table with DynamoDB Streams and read capacity auto scaling enabled.
    • Use an Amazon S3 bucket and S3 Transfer Acceleration to speed up the image download.
    • Use an Amazon Aurora database with a public DNS endpoint and auto scaling enabled.
    • Use an Amazon S3 backed Amazon CloudFront distribution with a high Time-to-Live (TTL) to maximize caching.
  6. A developer wants to secure sensitive configuration data such as passwords, database strings, and application license codes. Access to this sensitive information must be tracked for future audit purposes.

    Where should the sensitive information be stored, adhering to security best practices and operational requirements?

    • In an encrypted file on the source code bundle; grant the application access with Amazon IAM
    • In the Amazon EC2 Systems Manager Parameter Store; grant the application access with IAM
    • On an Amazon EBS encrypted volume; attach the volume to an Amazon EC2 instance to access the data
    • As an object in an Amazon S3 bucket; grant an Amazon EC2 instance access with an IAM role
  7. A developer has built an application using Amazon Cognito for authentication and authorization. After a user is successfully logged in to the application, the application creates a user record in an Amazon DynamoDB table.

    What is the correct flow to authenticate the user and create a record in the DynamoDB table?

    • Authenticate and get a token from an Amazon Cognito user pool. Use the token to access DynamoDB.
    • Authenticate and get a token from an Amazon Cognito identity pool. Use the token to access DynamoDB.
    • Authenticate and get a token from an Amazon Cognito user pool. Exchange the token for AWS credentials with an Amazon Cognito identity pool. Use the credentials to access DynamoDB.
    • Authenticate and get a token from an Amazon Cognito identity pool. Exchange the token for AWS credentials with an Amazon Cognito user pool. Use the credentials to access DynamoDB.
  8. A company is using AWS CloudFormation templates to deploy AWS resources. The company needs to update one of its AWS CloudFormation stacks.

    What can the company do to find out how the changes will impact the resources that are running?

    • Investigate the change sets.
    • Investigate the stack policies.
    • Investigate the Metadata section.
    • Investigate the Resources section.
  9. A developer has created a Node.js web application on a local development machine. The developer wants to use AWS technology to host the website. The developer needs a solution that requires the least possible operational overhead and no code changes.

    Which AWS service should the developer use to meet these requirements?

    • AWS Elastic Beanstalk
    • Amazon EC2
    • AWS Lambda
    • Amazon Elastic Kubernetes Service (Amazon EKS)
  10. An application is processing clickstream data using Amazon Kinesis. The clickstream data feed into Kinesis experiences periodic spikes. The PutRecords API call occasionally fails and the logs show that the failed call returns the response shown below:

    DVA-C01 AWS Certified Developer Associate Part 19 Q10 021
    DVA-C01 AWS Certified Developer Associate Part 19 Q10 021

    Which techniques will help mitigate this exception? (Choose two.)

    • Implement retries with exponential backoff.
    • Use a PutRecord API instead of PutRecords.
    • Reduce the frequency and/or size of the requests.
    • Use Amazon SNS instead of Kinesis.
    • Reduce the number of KCL consumers.
  11. A developer is creating a serverless ecommerce application that is based on AWS Lambda. An asynchronous workflow manages the checkout process and must orchestrate different Lambda functions. The workflow runs one function for each item in the shopping cart. The developer is using AWS Step Functions to orchestrate the process.

    The checkout process is running the Lambda functions serially, and the developer needs to improve the performance of the process.

    What should the developer do to meet these requirements?

    • Use a Choice state to identify the size of the cart and invoke a specific Lambda function with the entire cart content.
    • Use a Retry field for a second run to process all the items that failed.
    • Use a Parallel state to iterate over all the items in parallel.
    • Use a Map state to iterate over all the items in the cart.
  12. A company uses a third-party tool to build, bundle, and package its applications on-premises, and store them locally. The company uses Amazon EC2 instances to run its front-end applications.

    How can an application be deployed from the source control system onto the EC2 instances?

    • Use AWS CodeDeploy and point it to the local storage to directly deploy a bundle in a .zip, .tar, or .tar.gz format.
    • Upload the bundle to an Amazon S3 bucket and specify the S3 location when doing a deployment using AWS CodeDeploy.
    • Create a repository using AWS CodeCommit to automatically trigger a deployment to the EC2 instances.
    • Use AWS CodeBuild to automatically deploy the latest build to the latest EC2 instances.
  13. A developer is creating AWS CloudFormation templates to manage an application’s deployment in Amazon Elastic Container Service (Amazon ECS) through AWS CodeDeploy. The developer wants to automatically deploy new versions of the application to a percentage of users before the new version becomes available for all users.

    How should the developer manage the deployment of the new version?

    • Modify the CloudFormation template to include a Transform section and the AWS::CodeDeploy::BlueGreen hook.
    • Deploy the new version in a new CloudFormation stack. After testing is complete, update the application’s DNS records for the new stack.
    • Run CloudFormation stack updates on the application stack to deploy new application versions when they are available.
    • Create a nested stack for the new version. Include a Transform section and the AWS::CodeDeploy::BlueGreen hook.
  14. A company wants to make sure that only one user from its Admin group has the permanent right to delete an Amazon EC2 resource. There should be no changes in the existing policy under the Admin group.

    What should a developer use to meet these requirements?

    • AWS managed policy
    • Inline policy
    • IAM trust relationship
    • AWS Security Token Service (AWS STS)
  15. An AWS Lambda function accesses two Amazon DynamoDB tables. A developer wants to improve the performance of the Lambda function by identifying bottlenecks in the function.

    How can the developer inspect the timing of the DynamoDB API calls?

    • Add DynamoDB as an event source to the Lambda function. View the performance with Amazon CloudWatch metrics.
    • Place an Application Load Balancer (ALB) in front of the two DynamoDB tables. Inspect the ALB logs.
    • Limit Lambda to no more than five concurrent invocations. Monitor from the Lambda console.
    • Enable AWS X-Ray tracing for the function. View the traces from the X-Ray service.
  16. A company is planning to deploy an application on AWS behind an Elastic Load Balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses.

    Which load-balancing solution meets these requirements?

    • Use an Application Load Balancer and the X-Forwarded-For headers.
    • Use a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.
    • Use an Application Load Balancer. Register the targets by the instance ID.
    • Use a Network Load Balancer and the X-Forwarded-For headers.
  17. A company has an Amazon S3 bucket containing premier content that it intends to make available to only paid subscribers of its website. The S3 bucket currently has default permissions of all objects being private to prevent inadvertent exposure of the premier content non-playing website visitors.

    How can the company limit the ability to download a premier content file in the S3 bucket to paid subscribers only?

    • Apply a bucket policy that allows anonymous users to download the content form the S3 bucket.
    • Generate a pre-signed object URL for the premier content file when a paid subscriber requests a download.
    • Add a bucket policy that requires multi-factor authentication for requests to access the S3 bucket objects.
    • Enable server-side encryption on the S3 bucket for data protection against the non-paying website visitors.
  18. A developer is building a website that will be hosted in an Amazon S3 bucket with static website hosting enabled. The developer will use Amazon Route 53 for the DNS service and will use an alias record to point the company’s domain to the bucket. The developer must redirect one S3 object to a different URL.

    What should the developer use so that the redirect will work correctly from a page on the website?

    • A Route 53 CNAME alias record that points to the new location
    • An S3 object-level redirect through system-defined metadata
    • A Route 53 A record that points to the new location
    • A redirect that is configured within the S3 bucket’s policy
  19. A developer is creating an event handling system. To handle messages asynchronously, the developer created a standard Amazon SQS queue. Quality assurance testing reveals that some events were processed multiple times.

    What is the recommended way to ensure the events are not processed more than once?

    • Change long polling to short polling.
    • Use a FIFO queue and configure deduplication.
    • Convert the standard SQS queue into a FIFO queue.
    • Send the messages with message timers.
  20. A developer has written a multi-threaded application that is running on a fleet of Amazon EC2 instances. The operations team has requested a graphical method to monitor the number of running threads over time.

    What is the MOST efficient way to fulfill this request?

    • Periodically send the thread count to AWS X-Ray segments, then generate a service graph on demand.
    • Create a custom Amazon CloudWatch metric and periodically perform a PutMetricData call with the current thread count.
    • Periodically log thread count data to Amazon S3. Use Amazon Kinesis to process the data into a graph.
    • Periodically write the current thread count to a table using Amazon DynamoDB and use Amazon CloudFront to create a graph.
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments