DECK 2 Flashcards
A company is migrating from a monolithic architecture to a microservices-based architecture. The Developers need to refactor the application so that the many microservices can asynchronously communicate with each other without impacting performance.
Use of which managed AWS services will enable asynchronous message passing? (Choose two.)
A. Amazon SQS
B. Amazon Cognito
C. Amazon Kinesis
D. Amazon SNS
E. Amazon ElastiCache
A. Amazon SQS
D. Amazon SNS
An application runs on multiple EC2 instances behind an ELB.
Where is the session data best written so that it can be served reliably across multiple requests?
A. Write data to Amazon ElastiCache
B. Write data to Amazon Elastic Block Store.
C. Write data to Amazon EC2 Instance Store.
D. Write data to the root filesystem.
A. Write data to Amazon ElastiCache
A Developer is creating a Lambda function that will generate and export a file. The function requires 100 MB of temporary storage for temporary files while executing. These files will not be needed after the function is complete.
How can the Developer MOST efficiently handle the temporary files?
A. Store the files in EBS and delete the files at the end of the Lambda function.
B. Copy the files to EFS and delete the files at the end of the Lambda function.
C. Store the files in the /tmp directory and delete the files at the end of the Lambda function.
D. Copy the files to an S3 bucket with a lifecycle policy to delete the files.
C. Store the files in the /tmp directory and delete the files at the end of the Lambda function.
A Developer has developed a web application and wants to deploy it quickly on a Tomcat server on AWS. The Developer wants to avoid having to manage the underlying infrastructure.
What is the easiest way to deploy the application, based on these requirements?
A. AWS CloudFormation
B. AWS Elastic Beanstalk
C. Amazon S3
D. AWS CodePipeline
B. AWS Elastic Beanstalk
An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the Developer wants to examine the logs of the Lambda function code for errors.
Based on this system configuration, where would the Developer find the logs?
A. Amazon S3
B. AWS CloudTrail
C. Amazon CloudWatch
D. Amazon DynamoDB
C. Amazon CloudWatch
An organization is using Amazon CloudFront to ensure that its users experience low-latency access to its web application. The organization has identified a need to encrypt all traffic between users and CloudFront, and all traffic between CloudFront and the web application.
How can these requirements be met? (Choose two.)
A. Use AWS KMS to encrypt traffic between CloudFront and the web application.
B. Set the Origin Protocol Policy to HTTPS Only.
C. Set the Origin’s HTTP Port to 443.
D. Set the Viewer Protocol Policy to HTTPS Only or Redirect HTTP to HTTPS.
E. Enable the CloudFront option Restrict Viewer Access.
B. Set the Origin Protocol Policy to HTTPS Only.
D. Set the Viewer Protocol Policy to HTTPS Only or Redirect HTTP to HTTPS.
An application is using Amazon DynamoDB as its data store, and should be able to read 100 items per second as strongly consistent reads. Each item is 5 KB in size.
To what value should the table’s provisioned read throughput be set?
A. 50 read capacity units
B. 100 read capacity units
C. 200 read capacity units
D. 500 read capacity units
C. 200 read capacity units
A web application is designed to allow new users to create accounts using their email addresses. The application will store attributes for each user, and is expecting millions of user to sign up.
What should the Developer implement to achieve the design goals?
A. Amazon Cognito user pools
B. AWS Mobile Hub user data storage
C. Amazon Cognito Sync
D. AWS Mobile Hub cloud logic
A. Amazon Cognito user pools
A company needs a new REST API that can return information about the contents of an Amazon S3 bucket, such as a count of the objects stored in it. The company has decided that the new API should be written as a microservice using AWS Lambda and Amazon API Gateway.
How should the Developer ensure that the microservice has the necessary access to the Amazon S3 bucket, while adhering to security best practices?
A. Create an IAM user that has permissions to access the Amazon S3 bucket, and store the IAM user credentials in the Lambda function source code.
B. Create an IAM role that has permissions to access the Amazon S3 bucket and assign it to the Lambda function as its execution role.
C. Create an Amazon S3 bucket policy that speci fies the Lambda service as its principal and assign it to the Amazon S3 bucket.
D. Create an IAM role, attach the AmazonS3FullAccess managed policy to it, and assign the role to the Lambda function as its execution role.
B. Create an IAM role that has permissions to access the Amazon S3 bucket and assign it to the Lambda function as its execution role.
An application is running on an EC2 instance. The Developer wants to store an application metric in Amazon CloudWatch.
What is the best practice for implementing this requirement?
A. Use the PUT Object API call to send data to an S3 bucket. Use an event notification to invoke a Lambda function to publish data to CloudWatch.
B. Publish the metric data to an Amazon Kinesis Stream using a PutRecord API call. Subscribe a Lambda function that publishes data to CloudWatch.
C. Use the CloudWatch PutMetricData API call to submit a custom metric to CloudWatch. Provide the required credentials to enable the API call.
D. Use the CloudWatch PutMetricData API call to submit a custom metric to CloudWatch. Launch the EC2 instance with the required IAM role to enable the API call.
D. Use the CloudWatch PutMetricData API call to submit a custom metric to CloudWatch. Launch the EC2 instance with the required IAM role to enable the API call.
Queries to an Amazon DynamoDB table are consuming a large amount of read capacity. The table has a significant number of large attributes. The application does not need all of the attribute data.
How can DynamoDB costs be minimized while maximizing application performance?
A. Batch all the writes, and perform the write operations when no or few reads are being performed.
B. Create a global secondary index with a minimum set of projected attributes.
C. Implement exponential backoffs in the application.
D. Load balance the reads to the table using an Application Load Balancer.
B. Create a global secondary index with a minimum set of projected attributes.
AWS CodeBuild builds code for an application, creates the Docker image, pushes the image to Amazon Elastic Container Registry (Amazon ECR), and tags the image with a unique identifier.
If the Developers already have AWS CLI configured on their workstations, how can the Docker images be pulled to the workstations?
A. Run the following: docker pull REPOSITORY URI : TAG
B. Run the output of the following: aws ecr get-login and then run: docker pull REPOSITORY URI : TAG
C. Run the following: aws ecr get-login and then run: docker pull REPOSITORY URI : TAG
D. Run the output of the following: aws ecr get-download-url-for-layer and then run: docker pull REPOSITORY URI : TAG
B. Run the output of the following: aws ecr get-login and then run: docker pull REPOSITORY URI : TAG
A company caches session information for a web application in an Amazon DynamoDB table. The company wants an automated way to delete old items from the table.
What is the simplest way to do this?
A. Write a script that deletes old records; schedule the scripts as a cron job on an Amazon EC2 instance.
B. Add an attribute with the expiration time; enable the Time To Live feature based on that attribute.
C. Each day, create a new table to hold session data; delete the previous day’s table.
D. Add an attribute with the expiration time; name the attribute ItemExpiration.
B. Add an attribute with the expiration time; enable the Time To Live feature based on that attribute.
An application is expected to process many files. Each file takes four minutes to process each AWS Lambda invocation. The Lambda function does not return any important data.
What is the fastest way to process all the files?
A. First split the files to make them smaller, then process with synchronous RequestResponse Lambda invocations.
B. Make synchronous RequestResponse Lambda invocations and process the files one by one.
C. Make asynchronous Event Lambda invocations and process the files in parallel.
D. First join all the files, then process it all at once with an asynchronous Event Lambda invocation.
C. Make asynchronous Event Lambda invocations and process the files in parallel.
The upload of a 15 GB object to Amazon S3 fails. The error message reads: Your proposed upload exceeds the maximum allowed object size.
What technique will allow the Developer to upload this object?
A. Upload the object using the multi-part upload API.
B. Upload the object over an AWS Direct Connect connection.
C. Contact AWS Support to increase the object size limit.
D. Upload the object to another AWS region.
A. Upload the object using the multi-part upload API.
A company has an AWS CloudFormation template that is stored as a single file. The template is able to launch and create a full infrastructure stack.
Which best practice would increase the maintainability of the template?
A. Use nested stacks for common template patterns.
B. Embed credentials to prevent typos.
C. Remove mappings to decrease the number of variables.
D. Use AWS::Include to reference publicly-hosted template files.
A. Use nested stacks for common template patterns.
A Developer wants to encrypt new objects that are being uploaded to an Amazon S3 bucket by an application. There must be an audit trail of who has used the key during this process. There should be no change to the performance of the application.
Which type of encryption meets these requirements?
A. Server-side encryption using S3-managed keys
B. Server-side encryption with AWS KMS-managed keys
C. Client-side encryption with a client-side symmetric master key
D. Client-side encryption with AWS KMS-managed keys
B. Server-side encryption with AWS KMS-managed keys
An on-premises application makes repeated calls to store files to Amazon S3. As usage of the application has increased, LimitExceeded errors are being logged.
What should be changed to fix this error?
A. Implement exponential backoffs in the application.
B. Load balance the application to multiple servers.
C. Move the application to Amazon EC2.
D. Add a one second delay to each API call.
A. Implement exponential backoffs in the application.
An organization is storing large files in Amazon S3, and is writing a web application to display meta-data about the files to end-users. Based on the metadata a user selects an object to download. The organization needs a mechanism to index the files and provide single-digit millisecond latency retrieval for the metadata.
What AWS service should be used to accomplish this?
A. Amazon DynamoDB
B. Amazon EC2
C. AWS Lambda
D. Amazon RDS
A. Amazon DynamoDB
While developing an application that runs on Amazon EC2 in an Amazon VPC, a Developer identifies the need for centralized storage of application-level logs.
Which AWS service can be used to securely store these logs?
A. Amazon EC2 VPC Flow Logs
B. Amazon CloudWatch Logs
C. Amazon CloudSearch
D. AWS CloudTrail
B. Amazon CloudWatch Logs
A stock market monitoring application uses Amazon Kinesis for data ingestion. During simulated tests of peak data rates, the Kinesis stream cannot keep up with the incoming data.
What step will allow Kinesis to accommodate the traffic during peak hours?
A. Install the Kinesis Producer Library (KPL) for ingesting data into the stream.
B. Reduce the data retention period to allow for more data ingestion using DecreaseStreamRetentionPeriod.
C. Increase the shard count of the stream using UpdateShardCount.
D. Ingest multiple records into the stream in a single call using PutRecords.
C. Increase the shard count of the stream using UpdateShardCount.
Where can PortMapping be defined when launching containers in Amazon ECS?
A. Security groups
B. Amazon Elastic Container Registry (Amazon ECR)
C. Container agent
D. Task definition
D. Task definition
An application uses Amazon Kinesis Data Streams to ingest and process large streams of data records in real time. Amazon EC2 instances consume and process the data from the shards of the Kinesis data stream by using Amazon Kinesis Client Library (KCL). The application handles the failure scenarios and does not require standby workers. The application reports that a specific shard is receiving more data than expected. To adapt to the changes in the rate of data flow, the hot shard is resharded.
Assuming that the initial number of shards in the Kinesis data stream is 4, and after resharding the number of shards increased to 6, what is the maximum number of EC2 instances that can be deployed to process data from all the shards?
A. 12
B. 6
C. 4
D. 1
B. 6
A Development team is working on a case management solution that allows medical claims to be processed and reviewed. Users log in to provide information related to their medical and financial situations.
As part of the application, sensitive documents such as medical records, medical imaging, bank statements, and receipts are uploaded to Amazon S3. All documents must be securely transmitted and stored. All access to the documents must be recorded for auditing.
What is the MOST secure approach?
A. Use S3 default encryption using Advanced Encryption Standard-256 (AES-256) on the destination bucket.
B. Use Amazon Cognito for authorization and authentication to ensure the security of the application and documents.
C. Use AWS Lambda to encrypt and decrypt objects as they are placed into the S3 bucket.
D. Use client-side encryption/decryption with Amazon S3 and AWS KMS.
D. Use client-side encryption/decryption with Amazon S3 and AWS KMS.
A company has an internet-facing application that uses Web Identity Federation to obtain a temporary credential from AWS Security Token Service (AWS STS).
The app then uses the token to access AWS services.
Review the following response:
https://www.examtopics.com/assets/media/exam-media/03756/0005900001.jpg
Based on the response displayed, what permissions are associated with the call from the application?
A. Permissions associated with the role AROACLKWSDQRAOEXAMPLE:app1
B. Permissions associated with the default role used when the AWS service was built
C. Permission associated with the IAM principal that owns the AccessKeyID ASgeIAIOSFODNN7EXAMPLE
D. Permissions associated with the account that owns the AWS service
A. Permissions associated with the role AROACLKWSDQRAOEXAMPLE:app1
A Developer is using AWS CLI, but when running list commands on a large number of resources, it is timing out.
What can be done to avoid this time-out?
A. Use pagination
B. Use shorthand syntax
C. Use parameter values
D. Use quoting strings
A. Use pagination
What does an Amazon SQS delay queue accomplish?
A. Messages are hidden for a configurable amount of time when they are first added to the queue.
B. Messages are hidden for a configurable amount of time after they are consumed from the queue.
C. The consumer can poll the queue for a configurable amount of time before retrieving a message.
D. Message cannot be deleted for a configurable amount of time after they are consumed from the queue.
A. Messages are hidden for a configurable amount of time when they are first added to the queue.
A company has multiple Developers located across the globe who are updating code incrementally for a development project. When Developers upload code concurrently, internet connectivity is slow, and it is taking a long time to upload code for deployment in AWS Elastic Beanstalk.
Which step will result in minimized upload and deployment time with the LEAST amount of administrative effort?
A. Allow the Developers to upload the code to an Amazon S3 bucket, and deploy it directly to Elastic Beanstalk.
B. Allow the Developers to upload the code to a central FTP server to deploy the application to Elastic Beanstalk.
C. Create an AWS CodeCommit repository, allow the Developers to commit code to it, and then directly deploy the code to Elastic Beanstalk.
D. Create a code repository on an Amazon EC2 instance so that all Developers can update the code, and deploy the application from the instance to Elastic Beanstalk.
C. Create an AWS CodeCommit repository, allow the Developers to commit code to it, and then directly deploy the code to Elastic Beanstalk.
A company recently migrated its web, application and NoSQL database tiers to AWS. The company is using Auto Scaling to scale the web and application tiers.
More than 95 percent of the Amazon DynamoDB requests are repeated read-requests.
How can the DynamoDB NoSQL tier be scaled up to cache these repeated requests?
A. Amazon EMR
B. Amazon DynamoDB Accelerator
C. Amazon SQS
D. Amazon CloudFront
B. Amazon DynamoDB Accelerator
A company is building an application to track athlete performance using an Amazon DynamoDB table. Each item in the table is identified by a partition key
(user_id) and a sort key (sport_name). The table design is shown below:
https://www.examtopics.com/assets/media/exam-media/03756/0006200001.png
(Note: Not all table attributes are shown)
A Developer is asked to write a leaderboard application to display the top performers (user_id) based on the score for each sport_name.
What process will allow the Developer to extract results MOST efficiently from the DynamoDB table?
A. Use a DynamoDB query operation with the key attributes of user_id and sport_name and order the results based on the score attribute.
B. Create a global secondary index with a partition key of sport_name and a sort key of score, and get the results
C. Use a DynamoDB scan operation to retrieve scores and user_id based on sport_name, and order the results based on the score attribute.
D. Create a local secondary index with a primary key of sport_name and a sort key of score and get the results based on the score attribute.
B. Create a global secondary index with a partition key of sport_name and a sort key of score, and get the results
A Developer is creating a mobile application that will not require users to log in.
What is the MOST efficient method to grant users access to AWS resources?
A. Use an identity provider to securely authenticate with the application.
B. Create an AWS Lambda function to create an IAM user when a user accesses the application.
C. Create credentials using AWS KMS and apply these credentials to users when using the application.
D. Use Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources.
D. Use Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources.
An application running on Amazon EC2 instances must access objects within an Amazon S3 bucket that are encrypted using server-side encryption using AWS
KMS encryption keys(SSE-KMS). The application must have access to thecustomer master key (CMK) to decrypt the objects.
Which combination of steps will grant the application access? (Choose two.)
A. Write an S3 bucket policy that grants the bucket access to the key.
B. Grant access to the key in the IAM EC2 role attached to the application’s EC2 instances.
C. Write a key policy that enables IAM policies to grant access to the key.
D. Grant access to the key in the S3 bucket’s ACL
E. Create a Systems Manager parameter that exposes the KMS key to the EC2 instances.
B. Grant access to the key in the IAM EC2 role attached to the application’s EC2 instances.
C. Write a key policy that enables IAM policies to grant access to the key.
A company needs a fully-managed source control service that will work in AWS. The service must ensure that revision control synchronizes multiple distributed repositories by exchanging sets of changes peer-to-peer. All users need to work productively even when not connected to a network.
Which source control service should be used?
A. Subversion
B. AWS CodeBuild
C. AWS CodeCommit
D. AWS CodeStar
C. AWS CodeCommit
A Developer is writing a serverless application that requires that an AWS Lambda function be invoked every 10 minutes.
What is an automated and serverless way to trigger the function?
A. Deploy an Amazon EC2 instance based on Linux, and edit its /etc/crontab file by adding a command to periodically invoke the Lambda function.
B. Configure an environment variable named PERIOD for the Lambda function. Set the value to 600.
C. Create an Amazon CloudWatch Events rule that triggers on a regular schedule to invoke the Lambda function.
D. Create an Amazon SNS topic that has a subscription to the Lambda function with a 600-second timer.
C. Create an Amazon CloudWatch Events rule that triggers on a regular schedule to invoke the Lambda function.
A Developer is writing an imaging micro service on AWS Lambda. The service is dependent on several libraries that are not available in the Lambda runtime environment.
Which strategy should the Developer follow to create the Lambda deployment package?
A. Create a ZIP file with the source code and all dependent libraries.
B. Create a ZIP file with the source code and a script that installs the dependent libraries at runtime.
C. Create a ZIP file with the source code. Stage the dependent libraries on an Amazon S3 bucket indicated by the Lambda environment variable LD_LIBRARY_PATH
D. Create a ZIP file with the source code and a buildspec.yaml file that installs the dependent libraries on AWS Lambda.
A. Create a ZIP file with the source code and all dependent libraries.
A Developer is designing a fault-tolerant environment where client sessions will be saved.
How can the Developer ensure that no sessions are lost if an Amazon EC2 instance fails?
A. Use sticky sessions with an Elastic Load Balancer target group.
B. Use Amazon SQS to save session data.
C. Use Amazon DynamoDB to perform scalable session handling.
D. Use Elastic Load Balancer connection draining to stop sending requests to failing instances.
C. Use Amazon DynamoDB to perform scalable session handling.
In a move toward using microservices, a company’s Management team has asked all Development teams to build their services so that API requests depend only on that service’s data store. One team is building a Payments service which has its own database; the service needs data that originates in the Accounts database. Both are using Amazon DynamoDB.
What approach will result in the simplest, decoupled, and reliable method to get near-real time updates from the Accounts database?
A. Use Amazon Glue to perform frequent ETL updates from the Accounts database to the Payments database.
B. Use Amazon ElastiCache in Payments, with the cache updated by triggers in the Accounts database.
C. Use Amazon Kinesis Data Firehose to deliver all changes from the Accounts database to the Payments database.
D. Use Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database.
D. Use Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database.