Development with AWS Services

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

A developer will be building a game data feed application which will continuously collect data about player-game interactions and feed the data into your gaming platform. The application uses the Kinesis Client Library to process the data stream from the Amazon Kinesis Data Streams and stores the data to Amazon DynamoDB. It is required that the system should have enough shards and EC2 instances in order to handle failover and adequately process the amount of data coming in and out of the stream. Which of the following ratio of the number of Kinesis shards to EC2 worker instances should the developer implement to achieve the above requirement in the most cost-effective and highly available way?

4 shards : 2 instances

Amazon S3 publishes events to an AWS Lambda function whenever a new object is created in a bucket. It takes about 15 seconds for the function to complete the processing and on average, there are 20 new objects being added in the bucket every second. In this scenario, how many concurrent executions will your function have?

300

A developer is working on an application which stores data to an Amazon DynamoDB table with the DynamoDB Streams feature enabled. He set up an event source mapping with DynamoDB Streams and AWS Lambda function to monitor any table changes then store the original data of the overwritten item in S3. When an item is updated, it should only send a copy of the item's previous value to an S3 bucket and maintain the new value in the DynamoDB table. Which StreamViewType is the MOST suitable one to use in the DynamoDB configuration to fulfill this scenario?

OLD_IMAGE

A developer wants to perform additional processing on newly inserted items in Amazon DynamoDB using AWS Lambda. In order to implement this requirement, the developer will have to use DynamoDB Streams to automatically send the new items in the table to a Lambda function for processing. Given the scenario, what steps should be performed by the developer to integrate his/her DynamoDB to his/her Lambda functions?

Select AWSLambdaDynamoDBExecutionRole managed policy as the function's execution role and create an event source mapping in Lambda to send records form your stream to a Lambda function

A developer has recently launched a new API Gateway service which is integrated with AWS Lambda. He enabled API caching and per-key cache invalidation features in the API Gateway to comply with the requirement of the front-end development team which will use the API. The front-end team will have to invalidate an existing cache entry in some scenarios and fetch the latest data from the integration endpoint. Which of the following should the consumers of the API do to invalidate the cache in API Gateway?

Send a request with the Cache-Control: max-age=0 header

A mobile app is using a backend API hosted in AWS. You want to develop a push notification feature that can send messages directly to mobile apps whenever there is a new version of the app available. The notification message can include a link to download and install the update. Which of the following is the BEST service to use to develop this feature?

Simple Notification Service (SNS)

A developer needs to configure the environment name, solution stack, and environment links of his application environment which will be hosted in Elastic Beanstalk. Which configuration file should the developer add in the source bundle to meet the above requirement?

env.yaml

A financial application is using DynamoDB transactional read and write APIs to manage complex business workflows that require adding, updating, or deleting multiple items as a single, all-or-nothing operation. The DynamoDB table stores items with an average size of 4 KB and it constantly receives 250 read requests per second. However, DynamoDB frequently returns a ProvisionedThroughputExceededException which is greatly affecting the application. What should be the correct value of the RCU in order to solve this throttling issue?

500

Your application is processing one Kinesis data stream which has four shards, and each instance has one KCL worker. To scale up processing in your application, you reshard your stream to increase the number of open shards to six. What is the MAXIMUM number of EC2 instances that you should launch to achieve optimum performance?

6

You are working as a software developer for a leading IT consulting company, which uses DynamoDB to utilize its eventual consistency model that maximizes the read throughput. The application that you are developing will be storing 75 items to a DynamoDB table every second, where each item is 11.5 KB in size. How many Write Capacity Units (WCU) should you provision to the table to handle the expected load?

900

Your development team is heavily relying on AWS managed solutions like CodeCommit, CodeBuild, CodePipeline, and CodeDeploy. As your project grows, you would like to further automate your CI/CD process. The management also requested to have a project dashboard to centrally monitor application activity and manage day-to-day development tasks. Which of the following AWS services will help you achieve this?

AWS CodeStar

A startup has an urgent requirement to deploy their new NodeJS application to AWS. You were assigned to perform the deployment to a service where you don't need to worry about the underlying infrastructure that runs the application. The service must also automatically handle provisioning, load balancing, scaling, and application health monitoring. Which service will you use to easily deploy and manage the application?

AWS Elastic Beanstalk

You are developing an application that continuously collects data about player-game interactions and feeds the real-time data into your gaming platform. There is a requirement to make the system highly scalable to accommodate the sudden influx of gamers that will use the platform. Which AWS service will help you achieve this?

AWS Kinesis Data Stream

A company is transitioning their systems to AWS due to the limitations of their on-premises data center. As part of this project, a developer was assigned to build a brand new serverless architecture in AWS which will be composed of ElastiCache, AWS Lambda, API Gateway, and DynamoDB in a single stack. She needs a simple and reliable framework that will allow her to share configuration, such as memory and timeouts, between resources and deploy all related resources together as a single, versioned entity. Which of the following is the MOST appropriate service that the developer should use in this scenario?

AWS SAM

A company has assigned a developer to automate the patch management, data synchronization, and other recurring tasks in their department. The developer needs to have a service which can coordinate multiple AWS services into serverless workflows. Which of the following is the MOST cost-effective service that the developer should implement in this scenario?

AWS Step Functions

A developer uses AWS SAM templates to deploy a serverless application. He needs to embed the application from the AWS Serverless Application Repository or from an S3 bucket as a nested application. Which of the following resource type is the most SUITABLE one that the developer should use?

AWS::Serverless::Application

A developer monitors multiple sensors inside a data center which detects various environmental conditions that may affect their running servers. In the current architecture, the data is initially processed by an AWS Lambda function and then stored in an Amazon Redshift Cluster. To make the system more durable and scalable, the developer used an Amazon SQS FIFO queue to store the data which will be polled by the Lambda function. There is a known issue with the sensor devices that they occasionally send duplicate data. What should you do to manage and avoid duplicates in your system?

Add a Message Deduplication ID to the message's content body and modify the interval to a more appropriate period.

You are developing an application which allows the users to easily make cartoon animations and store the generated media files to AWS. The required IAM role has also been created with the appropriate permissions to upload the files to an S3 bucket and to other AWS resources. Which API call should you use to allow the application to upload the files to S3?

AssumeRole

A data analytics company has installed sensors to track the number of people that goes to the mall. The data sets are collected in real-time by an Amazon Kinesis Data Stream which has a consumer that is configured to process data every other day and store the results to S3. Your team noticed that your S3 bucket is only receiving half of the data that is being sent to the Kinesis stream but after checking, you have verified that the sensors are properly sending the data to Amazon Kinesis in real-time without any issues. Which of the following is the MOST likely root cause of this issue?

By default, the data records are only accessible for 24 hours from the time they are added to a Kinesis stream.

A developer has recently completed a new version of a serverless application that is ready to be deployed using AWS SAM. There is a requirement that the traffic should shift from the previous Lambda function to the new version gradually, in the shortest time possible. Which deployment configuration is the MOST suitable one to use in this scenario?

CodeDeployDefault.LambdaCanary10Percent5Minutes

A startup has recently launched their new mobile game and is gaining a lot of new users everyday. The founders plan to add a new feature which will enable cross-device syncing of user profile data across mobile devices to improve the user experience. Which of the following services should they use to meet this requirement?

Cognito Sync

A developer is planning to deploy a high-performance online trading application which requires a database that can scale globally and can handle frequent schema changes. The database should also support flexible schemas that enable faster and more iterative development. Which is the MOST suitable database service that you should use to achieve this requirement?

DynamoDB

A developer is working on an online game based on a popular movie, which may have a few users on its first few weeks of release. However, it is expected to grow and reach millions of concurrent users, with terabytes or more of new data generated per day. The database must seamlessly handle hundreds of thousands of reads and writes per second. Which of the following would be the MOST ideal data store to choose for this application?

DynamoDB

A developer is designing the cloud architecture of an internal application which will be used by about a hundred employees. She needs to ensure that the architecture is elastic enough to adequately match the supply of resources to the demand while maintaining its cost-effectiveness. Which of the following services can provide the MOST elasticity to the architecture?

DynamoDB & EC2 Spot Fleet

A developer is currently building a scalable microservices architecture where complex applications are decomposed into smaller, independent services. Docker will be used as its application container to provide an optimal way of running small, decoupled services. The developer should also have fine-grained control over the custom application architecture. Which of the following services is the MOST suitable one to use?

ECS

You are developing an application that will use a Lambda function, which will be invoked asynchronously. The application will be implemented with exponential back-off that will handle failures so that the requests will be retried twice before the event is discarded. If the retries fail with an unexpected error, you have to direct unprocessed events to another service which will analyze the failure. Which of the following is the MOST suitable component that you should implement in the application architecture to meet the above requirement?

Dead Letter Queue

You recently deployed an application to a newly created AWS account, which uses two identical Lambda functions to process ad-hoc requests. The first function processes incoming requests efficiently but the second one has a longer processing time even though both of the functions have exactly the same code. Based on your monitoring, the Throttles metric of the second function is greater than the first one in Amazon CloudWatch. Which of the following are possible solutions that you can implement to fix this issue?

Decrease the concurrency execution limit of the first function and set the concurrency execution limit of both functions to 450

There is a requirement to postpone the delivery of new messages to an SQS queue for a number of seconds. You must configure the queue to ensure that any messages that you send remain invisible to consumers for a duration of time specified. Which of the following SQS feature should you use to meet this requirement?

Delay Queue

A development team has several developers where each of them has a corresponding IAM user. It is your primary responsibility to grant the developers access to CodeCommit to enable them to fully utilize the code repositories on their local computers. Which of the following should you implement to grant access to your developers?

Generate new SSH keys and associate the public SSH key to each of your developer's IAM user and generate HTTPS Git credentials

You are developing a high-traffic online stocks trading application, which will be hosted in an ECS Cluster and will be accessed by thousands of investors for intraday stocks trading. Each task of the cluster should be evenly placed across multiple Availability Zones to avoid any service disruptions. Which of the following is the MOST suitable placementStrategy configuration that you should use in your task definition?

"placementStrategy": [ { "field": "attribute:ecs.availability-zone", "type": "spread" } ]

A company has an application that is using CloudFront to serve their static contents to their users around the globe. They are receiving a number of bad reviews from their customers lately because it takes a lot of time to log into their website. Sometimes, their users are also getting HTTP 504 errors which is why the developer was instructed to fix this problem immediately. Which of the following combination of options should the developer use together to set up a cost-effective solution for this scenario?

- Customize the content that the CloudFront web distribution delivers to your users using Lambda@Edge, which allows your Lambda functions to execute the authentication process in AWS locations closer to the users. - Configure an origin failover by creating an origin group with two origins. Specify one as the primary origin and the other as the second origin which CloudFront automatically switches to when the primary origin returns specific HTTP status code failure responses.

A developer is planning to add a global secondary index in a DynamoDB table. This will allow the application to query a specific index that can span all of the data in the base table, across all partitions. Which of the following should the developer consider when using this type of index?

- Queries or scans on this index consume capacity units from the index, not from the base table. - Queries on this index support eventual consistency only.

You are a developer for a global technology company, which heavily uses AWS with regional offices in San Francisco, Manila, and Bangalore. Most of the clients of your company are using serverless computing in which you are responsible for ensuring that their applications are working efficiently. Which of the following options are valid considerations in improving the performance of your Lambda function?

- The concurrent execution limit is enforced against the sum of the concurrent executions of all function. - An increase in memory size triggers an equivalent increase in CPU available to your function.

Your request to increase your account's concurrent execution limit to 2000 has been recently approved by AWS. There are 10 Lambda functions running in your account and you already specified a concurrency execution limit on one function at 400 and on another function at 200. Which of the following statements are TRUE in this scenario?

- You can still set a concurrency execution limit of 1300 to a third Lambda function. - The remaining 1400 concurrent executions will be shared among the other 8 functions.

You are designing the DynamoDB table that will be used by your Node.js application. It will have to handle 10 writes per second and then 20 eventually consistent reads per second where all the items have a size of 2 KB for both operations. Which of the following are the most optimal WCU and RCU that you should provision to the table?

10 RCU and 20 WCU

A company is re-architecting its legacy application to use AWS Lambda and DynamoDB database. The table is provisioned to have 10 read capacity units and each item has a size of 4 KB. How many eventual and strong consistent read requests can the table handle per second?

10 strongly consistent reads and 20 eventually consistent reads per second

A serverless application is composed of a Lambda function and a DynamoDB database which processes Amazon S3 events. The Lambda function takes an average of three seconds to process the data and Amazon S3 publishes 10 events per second. How many concurrent executions will your function have?

30

You are developing a Node.js application which uses a DynamoDB database. The architecture should be designed to allow you to query over a single partition of the table, as specified by the partition key value in the query. It should also support both eventually consistent and strongly consistent reads. What should you do to satisfy this requirement?

Add a local secondary index before the table is created.

A programmer is developing a shell script which uses AWS CLI to list all objects of a given bucket. However, the script is timing out if the bucket has tens of thousands of objects. What is the BEST solution that the programmer should implement to rectify this issue?

Add pagination parameters in the AWS CLI command

A software engineer is developing a serverless application which will use a DynamoDB database. One of the requirements is that each write request should return the total number of write capacity units consumed, with subtotals for the table and any secondary indexes that were affected by the operation. What should be done to accomplish this feature?

Add the ReturnConsumedCapacity parameter with a value of INDEXES in every write request

An online role-playing video game requires cross-device syncing of application-related user data. It must synchronize the user profile data across mobile devices without requiring your own backend. When the device is online, it should synchronize data and notify other devices immediately that an update is available. Which of the following is the most suitable feature that you have to use to meet this requirement?

Amazon Cognito Sync

A developer is building a web application which requires a multithreaded event-based key/value cache store that will cache result sets from database calls. You need to run large nodes with multiple cores for your cache layer and it should scale up or down as the demand on your system increases and decreases. Which of the following is the MOST suitable service that you should use?

Amazon ElastiCache for Memcached

A global financial company has hundreds of users from all over the world that regularly upload terabytes of transactional data to a centralized S3 bucket. You noticed that there are some users from different parts of the globe that take a lot of time to upload their data, which causes delays in the processing. You need to improve data throughput and ensure consistently fast data transfer to the S3 bucket regardless of the user's location. Which of the following features should you use to satisfy the above requirement?

Amazon S3 Transfer Acceleration

You are working for a software development company that uses AWS CodePipeline as their CI/CD platform to build, test, and push their deployments to their production environment. You have created a Lambda function that will push the build details on a separate DynamoDB table. You want to trigger this function after the successful build stage on your Pipeline. Which of the following services will help you achieve this?

CloudWatch Events

A developer is designing an application which will be hosted in ECS and uses an EC2 launch type. You need to group your container instances by certain attributes such as Availability Zone, instance type, or custom metadata. After you have defined a group of container instances, you will need to customize Amazon ECS to place tasks on container instances based on the group you specified. Which of the following ECS features provides you with expressions that you can use to group container instances by a specific attribute?

Cluster Query Language

You have two users concurrently accessing a DynamoDB table and submitting updates. If a user will modify a specific item in the table, she needs to make sure that the operation will not affect another user's attempt to modify the same item. You have to ensure that your update operations will only succeed if the item attributes meet one or more expected conditions. Which of the following DynamoDB features should you use in this scenario?

Conditional writes

A developer is launching a Lambda function which requires access to a MySQL RDS instance that is in a private subnet. Which of the following is the MOST secure way to achieve this?

Configure the Lambda function to connect to your VPC.

A commercial bank is developing an online auction application with a DynamoDB database that will allow customers to bid for real estate properties from the comforts of their homes. The application should allow the minimum acceptable price established by the bank prior to the auction. The opening bid entered by the staff must be at least the minimum bid and the new bids submitted by the customers should be greater than the current bid. The application logic has already been implemented but the DynamoDB database calls should also be tailored to meet the requirements. Which of the following is the MOST effective solution that will satisfy the requirement in this scenario?

Configure the database calls of the application to use conditional updates and conditional writes with a condition expression that will check if the new bid submitted by the customer is greater than the current bid.

A serverless application is using API Gateway with a non-proxy Lambda Integration. A developer was tasked to expose a GET method on a new /getcourses resource to invoke the Lambda function, which will allow the consumers to fetch a list of online courses in JSON format. The consumers must include a query string parameter named courseType in their request to get the data. What is the MOST efficient solution that the developer should do to accomplish this requirement?

Configure the method request of the resource

A mobile game is using a DynamoDB table named GameScore that keeps track of users and scores. Each item in the table is identified by a partition key (UserId) and a sort key (GameTitle). A developer want to write a leaderboard application to display top scores for each game, by querying over the entire table and across all its partitions. What should the developer do to to meet this requirement?

Create a global secondary index

An online forum requires a new table in DynamoDB named Thread in which the partition key is ForumName and the sort key is Subject. The following diagram shows how the items in the table would be organized: For reporting purposes, the application needs to find all of the threads that have been posted in a particular forum within the last three months. Which of the following is the MOST effective solution that you should implement?

Create a local secondary index and use the Query operation to utilize the LastPostDateTime attribute as the sort key.

You are working for a startup which recently decided to host their web applications to AWS. All of the source code of their applications are hosted in Github and they are planning to migrate them all to CodeCommit. Which of the following BEST describes the process of migrating an existing Git repository to a CodeCommit repository?

Create a new CodeCommit repository. Clone your existing Git repository and then push its contents to the newly created CodeCommit repository.

You were recently hired by a media company which is planning to build a news portal using Elastic Beanstalk and DynamoDB database, which already contains a few data. There is already an existing DynamoDB Table which has an attribute of ArticleName which acts as the partition key and a Category attribute as its sort key. You are instructed to develop a feature which will query the ArticleName attribute but will use a different sort key other than the existing one. The feature also requires strong read consistency to fetch the most up-to-date data. Which of the following solution should you implement?

Create a new DynamoDB table with a Local Secondary Index that uses the ArticleName attribute with a different sort key. Migrate the data from the existing table to the new table.

A leading technology company is building a serverless application in AWS using the C++ programming language. The application will use DynamoDB as its data store, Lambda as its compute service, and API Gateway as its API Proxy. You are tasked to handle the deployment of the compute resources to AWS. Which of the following steps should you implement to properly deploy the serverless application?

Create a new layer which contains the Custom Runtime for C++ and then launch a Lambda function which uses that runtime.

You currently have an IAM user for working in the development environment using shell scripts that call the AWS CLI. The EC2 instance that you are using already contains the access key credential set and an IAM role, which are used to run the CLI and access the development environment. You were given a new set of access key credentials with another IAM role that allows you to access and manage the production environment. Which of the following is the EASIEST way to switch from one role to another?

Create a new profile for the role in the AWS CLI configuration file then append the --profile parameter, along with the new profile name, whenever you run the CLI command.

A developer is building an AI-based traffic monitoring application using Lambda in AWS. Due to the complexity of the application, the developer must do certain modifications such as the way Lambda runs the function's setup code and how the invocation events are read from the Lambda runtime API. In this scenario, which feature of Lambda should you take advantage of to meet the above requirement?

Custom Runtime

A developer is building a prototype microservices that are running as tasks in an Amazon ECS Cluster. His manager instructed him to define a task placement strategy which needs to be both cost and resource efficient. The task placement should minimize the number of instances in use which will keep the cost down since high availability is not much of a concern for this prototype. What should the developer implement to meet the above requirements?

Distribute tasks among all registered EC2 instances based on the least available amount of CPU or memory using the binpack task placement strategy

A developer is working on a Lambda function which has an event source mapping to process requests from API Gateway. The function will consistently have 10 requests per second and it will take a maximum of 50 seconds to complete each request. What should the developer do to prevent the function from throttling?

Do nothing since Lambda will automatically scale to handle the load

Your new web app is running on several on-demand EC2 instances behind a Classic Load Balancer. One of your EC2 instances has failed the health check and is no longer receiving traffic. After manually rebooting the instance, the application check becomes healthy again. Which of the following steps will you do next?

Do nothing, the ELB will direct traffic to it after the health check threshold is passed.

A company has recently developed a containerized application that uses a multicontainer Docker platform which supports multiple containers per instance. They need a service that automatically handles tasks such as provisioning of the resources, load balancing, auto-scaling, monitoring, and placing the containers across the cluster. Which of the following services provides the EASIEST way to accomplish the above requirement?

Elastic Beanstalk

You are hosting a website in an Amazon S3 bucket named tutorialsdojo and your users load the website using the http://tutorialsdojo.s3-website-us-east-1.amazonaws.com endpoint. You want to use JavaScript on the webpages that are stored in this bucket to be able to make authenticated GET and PUT requests. These requests are directed to the same bucket through the website.s3.amazonaws.com S3 API endpoint. However, you noticed that your web browser blocks the HTTP requests originating from your website. What should you do to rectify this issue?

Enable Cross-origin resource sharing (CORS) configuration in the bucket.

You are developing an online learning platform using Lambda, Elastic Beanstalk, and DynamoDB. There is a requirement that whenever a new customer is added to the DynamoDB table, it will invoke a Lambda function that sends a welcome email to the customer. Which of the following is the MOST suitable solution that you should use to implement this feature?

Enable DynamoDB Streams and configure it as the event source for the Lambda function.

A company has a global multi-player game with a multi-master DynamoDB database topology which stores data in multiple AWS regions. You were assigned to develop a real-time data analytics application which will track and store the recent changes on all the tables from various regions. Only the new data of the recently updated item is needed to be tracked by your application. Which of the following is the MOST suitable way to configure the data analytics application to detect and retrieve the updated database entries automatically?

Enable DynamoDB Streams and set the value of StreamViewType to NEW_IMAGE. Use Kinesis Adapter in the application to consume streams from DynamoDB.

An application hosted in a multicontainer Docker platform in Elastic Beanstalk uses DynamoDB to handle the session data of its users. These data are only used in a particular timeframe and the stale data can be deleted after the user logged out of the system. Which of the following is the most suitable way to delete the session data?

Enable TTL for the session data in the DynamoDB table.

A social media application is using DynamoDB to manage and store the session data of its users. As the number of users grew, the number of items in the table exponentially increased as well. You have to reduce storage usage and also reduce the cost of storing irrelevant data without using provisioned throughput to rectify this issue. Which of the following is the MOST cost-effective solution that you should implement?

Enable Time To Live (TTL) in the table.

There has been reports that your application, which has a MySQL RDS database, becomes unresponsive from time to time. You were instructed to collect all SQL statements that took longer to execute for troubleshooting. What should you do to properly troubleshoot this issue with the LEAST amount of effort?

Enable slow query log in RDS

A developer is creating a new global secondary index on a provisioned mode DynamoDB table. Since the application will store large quantities of data, the write capacity units must be specified for the expected workload on both the base table and its secondary index. Which of the following should the developer do to avoid any potential request throttling?

Ensure that the global secondary index's provisioned WCU is equal or greater than the WCU of the base table.

A developer has deployed a Lambda function which will run in various environments such as DEV, TEST, UAT, and PROD. As part of its processing, the function also calls a set of external API services which varies based on the environment. The function must use different endpoints for these external services to properly complete the processing. Which of the following features in Lambda should the developer use to reference the appropriate external endpoint for each environment?

Environment Variables

A developer has a Node.js function running in AWS Lambda. Currently, the code initializes a database connection to an Amazon RDS database every time the Lambda function is executed, and closes the connection before the function ends. What feature in AWS Lambda will allow the developer to reuse the already existing database connection instead of initializing it each time the function is run?

Execution context

A developer wants to use multi-factor authentication (MFA) to protect programmatic calls to specific AWS API operations like Amazon EC2 StopInstances. He needs to call an API where he can submit the MFA code that is associated with his MFA device. Using the temporary security credentials that are returned from the call, he can then make programmatic calls to API operations that require MFA authentication. Which API should the developer use to properly implement this security feature?

GetSessionToken

A mobile game has a DynamoDB table named TutorialsDojoScores which keeps track of the users and their respective scores. Each item in the table is identified by the FighterId attribute as its partition key and the FightTitle attribute as the sort key. A developer needs to retrieve data from non-key attributes of the table named DojoTopScores and DojoDateTime attributes. Which type of index should the developer add in the table to speed up queries on non-key attributes?

Global Secondary Index

Your customers require access to the REST APIs of your web application which is hosted on EC2 instances behind a load balancer in your VPC. To accommodate this request, your web services should be integrated with API Gateway that has a custom data mapping. You need to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response. Which of the following integration types is the MOST suitable one to use in API Gateway to meet this requirement?

HTTP

A company has a website hosted in a multicontainer Docker environment in Elastic Beanstalk. There is a requirement to integrate the website with API Gateway, where it simply passes client-submitted method requests to the backend. It is important that the client and backend interact directly with no intervention from API Gateway after the API method is set up, except for known issues such as unsupported characters. Which of the following integration types is the MOST suitable one to use to meet this requirement?

HTTP_PROXY

Your serverless AWS Lambda functions are integrated with Amazon API gateway using Lambda proxy integration. The API caching feature is enabled in the API Gateway with a TTL value of 300 seconds. A client would like to fetch the latest data from your endpoints every time a request is sent and invalidate the existing cache. What should the client do in order to get the latest data?

Have the client send a request with the Cache-Control: max-age=0 header

A serverless application, which uses a DynamoDB database, is experiencing throttling issues during peak times. To troubleshoot the problem, you were instructed to get the total number of write capacity units consumed for the table and any secondary indexes whenever the UpdateItem operation is sent. In this scenario, what is the MOST appropriate value for the ReturnConsumedCapacity parameter that you should set in the update request?

INDEXES

Your company uses Elastic Beanstalk to manage a web application. You were instructed to configure the Elastic Beanstalk environment's deployment policy to launch new EC2 instances, and then deploy the new version of your application only to these new resources. Which of the following deployment methods can you use to meet this required configuration?

Immutable and Blue/Green Deployment

An application is hosted in Elastic Beanstalk with an ElastiCache cluster that acts as a database cache layer for accessing its data in DynamoDB. It is currently configured to write the data to the cache only if there is a cache miss, which causes the data in the cache to become stale. A developer is instructed to ensure that the data in the cache is always current and to minimize wasted space in the cluster by automatically deleting the data that are never read. What is the BEST way to implement this to satisfy the given requirement?

Implement a Write Through caching strategy in the application and enable TTL in Elasticache

Your application is hosted on an Auto Scaling group of EC2 instances with a DynamoDB database. There were a lot of data discrepancy issues where the changes made by one user were always overwritten by another user. You noticed that this usually happens whenever there are a lot of people updating the same data. What should you do to solve this problem?

Implement an optimistic locking strategy in your application source code by designating one property to store the version number in the mapping class for your table.

Both the read and write operations to your DynamoDB table are throttled, which are causing errors in your application. You checked the CloudWatch metrics but they indicate that the consumed capacity units haven't exceeded the provisioned capacity units. Upon further investigation, you found that the issue is caused by a "hot partition" in your table in which a certain partition is accessed by your downstream applications much more frequently than other partitions. What should you do to resolve this issue in your application with MINIMAL cost?

Implement error retries and exponential backoff, and refactor your application to distribute your read and write operations as evenly as possible across your table

A Java web application built using AWS SDK for Java with a DynamoDB database is concurrently accessed by thousands of users during peak time. The application is highly write-intensive and there are a lot of incidents where it overwrites stale data from the DynamoDB table. How can you ensure your database writes are protected from being overwritten by other write operations that are occurring at the same time without affecting the application performance?

Implement optimistic locking with version number.

A company is using OpenAPI, which is also known as Swagger, for the API specifications of their REST web services that are hosted on their on-premises data center. They want to migrate their system to AWS using Lambda and API Gateway. In line with this, you are instructed to create a new API and populate it with the resources and methods from their Swagger definition. Which of the following is the EASIEST way to accomplish this task?

Import their Swagger or OpenAPI definitions to API Gateway using the AWS Console.

A mobile game has a serverless backend in AWS which is composed of Lambda, API Gateway, and DynamoDB. It writes 100 items per second to the DynamoDB table and the size is 1.5 KB per item. The table has a provisioned WCU of 100 but the write requests are still being throttled by DynamoDB. What is the MOST suitable solution in order to rectify this throttling issue?

Increase the WCU to 200

You are developing a serverless application in AWS in which you have to control the code execution performance and costs of your Lambda functions. There is a requirement to increase the CPU available to your function in order to efficiently process records from an Amazon Kinesis data stream. Which of the following is the BEST way to meet this requirement?

Increase the allocated memory of the function

There is a requirement to improve the performance of your serverless application in AWS by increasing the allocated CPU available for your Lambda functions. Which of the following is the MOST appropriate solution that you should implement to meet this requirement?

Increase the memory configuration of your function.

You are developing an online game where the app preferences and game state of the player must be synchronized across devices. It should also allow multiple users to synchronize and collaborate shared data in real time. Which of the following is the MOST appropriate solution that you should implement in this scenario?

Integrate AWS AppSync to your mobile app

You developed a Lambda function which will send status updates to a third party provider for analytics. You need to schedule this function to run every 30 minutes. Which of the following is the MOST manageable and cost-effective way of setting up this task?

Integrate CloudWatch Events with Lambda, which will automatically trigger the function every 30 minutes.

You are working as a software developer for an online training company, which is currently developing a learning portal that will use a DynamoDB table. One of the acceptance criteria requires you to ensure that there will be no hot partitions in the table which will result in throttling and inefficient use of your provisioned I/O capacity. The portal contains hundreds of thousands of online courses including the ones from their 3rd-party educational partners, which may or may not have the same Course ID. Which of the following is the MOST suitable partition key to use in this scenario?

Item ID

You are planning to launch a Lambda function integrated with API Gateway. It is required to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response. Which of the following options is the MOST appropriate method use to meet this requirement?

Lambda custom integration

A developer has recently released a new Lambda function which calculates accruals, interests, and other financial data. This function must have a streamlined integration setup with API Gateway. The requirement is to pass the incoming request from the client as the input to the backend Lambda function, via HTTPS, in the following format: { "resource": "Resource path", "path": "Path parameter", "httpMethod": "Incoming request's method name" "headers": {String containing incoming request headers} "multiValueHeaders": {List of strings containing incoming request headers} "queryStringParameters": {query string parameters } "multiValueQueryStringParameters": {List of query string parameters} "pathParameters": {path parameters} "stageVariables": {Applicable stage variables} "requestContext": {Request context, including authorizer-returned key-value pairs} "body": "A JSON string of the request payload." "isBase64Encoded": "A boolean flag to indicate if the applicable request payload is Base64-encode" } Which of the following options is the MOST appropriate method to use to meet this requirement?

Lambda proxy integration

A web application is using an ElastiCache cluster that is suffering from cache churn, which means that a lot of cache data in the cluster are never read. There is a requirement to reconfigure the application to retrieve the data from the database only in the event that there is a cache miss. Which of the following caching strategy is the MOST suitable that the developer should implement?

Lazy Loading

You have created an SWF workflow to coordinate the tasks of your media processing cluster, which processes the videos, and a separate media publishing cluster, which publishes the processed videos. Since the media processing cluster converts a single video multiple times, you need to record how many times a video is converted before another action is executed. Which of the following SWF options can be used to record such events?

Markers

Your team is developing a new feature on your application which is already hosted in Elastic Beanstalk. After several weeks, the new version of the application is ready to be deployed and you were instructed to handle the deployment. What is the correct way to deploy the new version to Elastic Beanstalk via the CLI?

Package your application as a zip file and deploy it using the eb deploy command

A leading financial firm is looking for a solution which will accurately forecast their revenue with multiple levels of seasonality, involving sales with weekly, monthly or quarterly trends. To avoid affecting the accuracy of predictions, it should automatically exclude anomalies such as spikes due to a sudden price drop. Which of the following services should you use to build visualizations, get business insights, and continuously analyze your data?

Quicksight

You are developing a Lambda function which processes event notifications from Amazon S3. It is expected that the function will have: - 50 requests per second - 100 seconds to complete each request What should you do to prevent any issues when the function has been deployed and becomes operational?

Request for AWS to increase the limit of your concurrent executions

An application running in an EC2 instance is regularly fetching and processing a lot of data from an S3 bucket which resulted in a significant increase in your operating costs. You want to lower the latency of retrieving data from S3 and bring the operating costs down. To improve the system, you need to use simple structured query language (SQL) statements to filter the contents of Amazon S3 objects and retrieve just the subset of data that you need. Which is the MOST suitable service that will help you accomplish this requirement?

S3 Select

A website hosted in AWS has a custom CloudWatch metric to track all HTTP server errors in the site every minute, which occurs intermittently. An existing CloudWatch Alarm has already been configured for this metric but you would like to re-configure this to properly monitor the application. The alarm should only be triggered when all three data points in the most recent three consecutive periods are above the threshold. Which of the following options is the MOST appropriate way to monitor the website based on the given threshold?

Set both the Evaluation Period and Datapoints to Alarm to 3

The operating cost of a serverless application is quite high and you are instructed to look for ways to lower the costs. As part of its processing, a Lambda function sends 320 strongly consistent read requests per second to a DynamoDB table which has a provisioned RCU of 5440. The average size of items stored in the database is 17 KB. Which of the following is the MOST suitable action that should you do to make the application more cost-effective while maintaining its performance?

Set the provisioned RCU to 1600

A batch application is hosted in an Auto Scaling group of On-Demand EC2 instances which consumes and processes the messages from an SQS queue. The system works well but there are times that the consumers process the same message twice. Upon investigation, you found out that if the consumer takes a long time to process the message, that exact same message becomes available again to other consumers, which causes duplicate processing. Which of the following is the BEST solution that the developer should implement to meet this requirement?

Set the visibility timeout to the maximum time that it takes your application to process and delete a message from the queue.

A developer is instructed to collect data on the number of times that web visitors click the advertisement link of a popular news website. A database entry containing the count will be incremented for every click. Given that the website has millions of readers worldwide, your database should be configured to provide optimal performance to capture all the click events. What is the BEST service that the developer should implement in this scenario?

Set up Amazon DynamoDB for the database and implement atomic counters for UpdateItem operation of the website counter

For application deployments, a company is using CloudFormation templates, which are regularly updated to map the latest AMI IDs. A developer was assigned to automate the process since the current set up takes a lot of time to execute on a regular basis. Which of the following is the MOST suitable solution that the developer should implement to satisfy this requirement?

Set up CloudFormation with Systems Manager Parameter Store to retrieve the latest AMI IDs for your template. Whenever you decide to update the EC2 instances, call the update-stack API in CloudFormation in your CloudFormation template.

You have several API Gateway APIs with Lambda Integration for each release life cycle of your application. There is a requirement to consolidate multiple releases into a single API Gateway for the ALPHA, BETA, RC (Release Candidate), and PROD releases. For example, their clients can connect to their ALPHA release by using the alpha.tutorialsdojo.com endpoint and beta release through the beta.tutorialsdojo.com endpoint. As the AWS developer, how can you satisfy this requirement?

Setup Stage Variables for each release

A company is developing a distributed system which will use a Lambda function that will be invoked asynchronously. In the event of failure, the function must be retried twice before sending the unprocessed events to an Amazon SQS queue through the use of Dead Letter Queue (DLQ). Which of the following is the correct way to implement a DLQ in Lambda?

Specify the Amazon Resource Name of the SQS Queue in the Lambda function's DeadLetterConfig parameter

A medical technology company has a system hosted in AWS that manages their patients' high-resolution imaging records such as MRI, PET Positron Emission Tomography, CAT scan, and many others. For their archiving process, the records that are one year older are encrypted before they are archived to AWS Glacier. A doctor has a non-urgent request for a patient's medical record from 2 years ago, which should be made available within 5 hours. Which of the following is the MOST cost-effective retrieval option to use in this scenario?

Standard Retrieval

An e-commerce application, which is hosted in an ECS Cluster, contains the connection string of an external database and other sensitive configuration files. Since the application accepts credit card payments, the company has to meet strict security compliance which requires that the database credentials are encrypted and periodically rotated. Which of the following should you do to comply to the requirements?

Store the database credentials in AWS Secrets Manager and enable rotation.

Your Lambda function initializes a lot of external dependencies such as database connections and HTTP endpoints, which are required for data processing. It also fetches static data with a size of 20 MB from a third-party provider over the Internet every time the function is invoked. This adds significant time in the total processing, which greatly affects the performance of their serverless application. Which of the following should you do to improve the performance of your function?

Store the external files in the /tmp directory of the execution context which you can reuse for succeeding invocations.

A developer is building a new Docker application using ECS. She needs to allow containers to access ports on the host container instance to send or receive traffic using port mapping. Which component of ECS should the developer configure to properly implement this task?

Task definition

You are a newly hired developer in a leading investment bank which uses AWS as its cloud infrastructure. One of your tasks is to develop an application that will store financial data to an already existing S3 bucket, which has the following bucket policy. Which of the following statements is true about uploading data to this S3 bucket?

The bucket will deny object uploads unless the request includes the x-amz-server-side-encryption header with a value of AES256

A web application is running in an ECS Cluster and updates data in DynamoDB several times a day. The clients retrieve data directly from the DynamoDB through APIs exposed by Amazon API Gateway. Although API caching is enabled, there are specific clients that want to retrieve the latest data from DynamoDB for every API request sent. What should be done to only allow authorized clients to invalidate an API Gateway cache entry when submitting API requests?

The client must send a request which contains the Cache-Control: max-age=0 header, and tick the Require Authorization checkbox in the Cache Settings of your API via the console

A company has an AWS account with only 2 Lambda functions, which process data and store the results in an S3 bucket. An Application Load Balancer is used to distribute the incoming traffic to the two Lambda functions as registered targets. You noticed that in peak times, the first Lambda function works with optimal performance but the second one is throttling the incoming requests. Which of the following is the MOST likely root cause of this issue?

The concurrency execution limit provided to the first function is significantly higher than the second function.

A write-heavy data analytics application is using DynamoDB database which has global secondary index. Whenever the application is performing heavy write activities on the table, the DynamoDB requests return a ProvisionedThroughputExceededException. Which of the following is the MOST likely cause of this issue?

The provisioned write capacity for the global secondary index is less than the write capacity of the base table.

You are using an AWS Lambda function to process records in an Amazon Kinesis Data Streams stream which has 100 active shards. The Lambda function takes an average of 10 seconds to process the data and the stream is receiving 50 new items per second. Which of the following statements are TRUE regarding this scenario?

There will be at most 100 Lambda function invocations running concurrently.

A mobile game is currently being developed and needs to have an authentication service. You need to use an AWS service which provides temporary AWS credentials for users who have been authenticated via their social media logins as well as for guest users who do not require any authentication. How can you BEST achieve this using AWS?

Use AWS Cognito Identity Pools then enable access to unauthenticated identities.

The company that you are working for recently decided to migrate and transform their monolithic application on-premises to a Lambda application. It is your responsibility to ensure that application works effectively in AWS. Which of the following are the best practices in developing Lambda functions?

Use AWS Lambda Environment Variables to pass operational parameters to your function, and take advantage of Execution Context reuse to improve the performance of your function.

A web application running in Amazon Elastic Beanstalk reads and writes a large number of related items in DynamoDB and processes each item one at a time. The network overhead of these transactions causes degradation in the application's performance. You were instructed by your manager to quickly refactor the application but without introducing major code changes such as implementing concurrency management or multithreading. Which of the following solutions is the EASIEST method to implement that will improve the application performance in a cost-effective manner?

Use DynamoDB Batch Operations API for GET, PUT, and DELETE operations.

You are managing an application which is composed of an SQS queue and an Auto Scaling group of EC2 instances. Recently, your customers are complaining that there are a lot of incidents where their orders are being erroneously sent twice. What should you do to rectify this problem?

Use a FIFO (First-In-First-Out) Queue and provide the Message Deduplication ID for each message.

You have an application that reads an individual item from a DynamoDB table, modifies it locally, and submits the changes as a new entry to a separate table before proceeding onto the next item. The process is repeated for the next 100 entries, and it consumes a lot of time performing this entire process. Which strategy can be applied to your application in order to shorten the time needed to process all the necessary entries with MINIMAL configuration?

Use DynamoDB's BatchGetItem and BatchWriteItem API operations

A company decided to re-use the same Lambda function for multiple stages of their API, but the function should read data from a different Amazon DynamoDB table depending on which stage is being called. In order to accomplish this, they instructed the developer to pass configuration parameters to a Lambda function through mapping templates in API Gateway. Which of the following is the MOST suitable solution that the developer should use to meet this requirement?

Use Stage Variables

You want to update a Lambda function on your production environment and ensure that when you publish the updated version, you still have a quick way to roll back to the older version in case you encountered a problem. To prevent any sudden user interruptions, you want to gradually increase the traffic going to the new version. Which of the following implementation is the BEST option to use?

Use Traffic Shifting with Lambda Aliases

You are configuring the task definitions of your ECS Cluster in AWS to make sure that the tasks are scheduled on instances with enough resources to run them. It should also follow the constraints that you specified both implicitly or explicitly. Which of the following options should you implement to satisfy the requirement which requires the LEAST amount of configuration?

Use a random task placement strategy

A developer wants to track the number of visitors on their website, which has a DynamoDB database. This is primarily used to give a rough idea on how many people visit the site whenever they launch a new advertisement, which means it can tolerate a slight overcounting or undercounting of website visitors. Which of the following will satisfy the requirement with MINIMAL configuration?

Use atomic counters to increment the counter item in the DynamoDB table for every new visitor

An application performs various workflows and processes long-running tasks that take a long time to complete. The users are complaining that the application is unresponsive since the workflow substantially increased the time it takes to complete a user request. Which of the following is the BEST way to improve the performance of the application?

Use an Elastic Beanstalk worker environment to process the tasks asynchronously

A developer is designing a multi-threaded e-commerce application that will be reading and writing data on a DynamoDB table. There will be a lot of people who will use the application to update the price of items in the table at the same time. The application should prevent an update operation from modifying an item if one of its attributes has a certain value. Which of the following is the most suitable solution that the developer should use in this application?

Use optimistic locking and conditional writes

An ECS Cluster has a running X-Ray Daemon that enables developers to easily debug and troubleshoot their application. However, the trace data being sent to AWS X-Ray is still not as detailed as your manager wants it to be. There is a new requirement that requires the application to provide more granular timing information and more details about its downstream calls to various AWS resources. What should you do to satisfy this requirement?

Use subsegments

You are developing a serverless application in AWS which is composed of several Lambda functions and a DynamoDB database. The requirement is to process the requests asynchronously. Which of the following is the MOST suitable way to accomplish this?

Use the Invoke API to call the Lambda function and set the invocation type request parameter to Event

A web application is uploading large files, which are over 4 GB in size, in an S3 bucket called data.tutorialsdojo.com every 30 minutes. You want to minimize the time required to upload each file. Which of the following should you do to minimize upload time?

Use the Multipart upload API

An application in your development account is running in an AWS Elastic Beanstalk environment which has an attached Amazon RDS database. You noticed that if you terminate the environment, it also brings down the database which hinders you from performing seamless updates with blue-green deployments. This also poses a critical security risk if the company decides to deploy the application in production. In this scenario, how can you decouple your database instance from your environment without having any data loss?

Use the blue / green deployment strategy to decouple the Amazon RDS instance from your Elastic Beanstalk environment. Create an RDS DB snapshot of the database and enable deletion protection. Create a new Elastic Beanstalk environment with the necessary information to connect to the Amazon RDS instance. Before terminating the old Elastic Beanstalk environment, remove its security group rule first before proceeding.

A developer has been instructed to configure Cross-Region Replication (CRR) to their S3 bucket as part of the company's disaster recovery plan. She is using the put-bucket-replication AWS CLI to enable CRR on the bucket but it fails whenever she attempts to issue the command. However, the same command works for the other S3 buckets. Which of the following options is the MOST likely reason for this issue?

Versioning is not enabled in the bucket

A developer is planning to build a serverless Rust application in AWS using AWS Lambda and Amazon DynamoDB. Much to his disappointment, AWS Lambda does not natively support the Rust programming language. Can the developer still proceed with creating serverless Rust applications in AWS given the situation above?

Yes. The developer can create a custom runtime for hist Rust applications and bootstrap it to an AWS Lambda function.

You are working as an IT Consultant for a top investment bank in Europe which uses several serverless applications in their AWS account. They just launched a new API Gateway service with a Lambda proxy integration and you were instructed to test out the new API. However, you are getting a Connection refused error whenever you use this Invoke URL http://779protaw8.execute-api.us-east-1.amazonaws.com/tutorialsdojo/ of the API Gateway. Which of the following is the MOST likely cause of this issue?

You are not using HTTPS in invoking the API

A tech company has a real-time traffic monitoring system which uses Amazon Kinesis Data Stream to collect data and a group of EC2 instances that consume and process the data stream. Your development team is responsible for adjusting the number of shards in the data stream to adapt to changes in the rate of data flow. Which of the following are correct regarding Kinesis resharding which your team should consider in managing the application?

You can decrease the stream's capacity by merging shards and increase capacity by splitting shards

A technical manager needs permission to create new repositories and delete them in CodeCommit. This will enable her to manage all of the code repositories of each development teams and remove duplicate or unused ones. Which of the following permissions should be given in order to comply with the standard security advice of granting least privilege?

codecommit:CreateRepository & codecommit:DeleteRepository

The source code of an application is hosted in CodeCommit which has a single master branch. A developer requires certain permissions in order to pull and push code to the repository using the git fetch, git clone, and git push commands. To improve security, the developer should be granted only the permissions required to perform these tasks. Which of the following permissions should the developer have in order to properly access the repository?

codecommit:GitPull and codecommit:GitPush

You are planning to create a DynamoDB table for your employee profile website. This will be used by the Human Resources department to easily view details about each employee. When choosing the partition key of the table, which of the following is the BEST attribute to use?

employee_id because each employee ID is unique

In order to quickly troubleshoot their systems, your manager instructed you to record the calls that your application makes to all AWS services and resources. You developed a custom code that will send the segment documents directly to X-Ray by using the PutTraceSegments API. What should you include in your segment document to meet the above requirement?

subsegments


संबंधित स्टडी सेट्स

The Cell-an Introduction: Biology

View Set

Intro to Data Science and AI Maastricht Lectures 1-6b

View Set

SECURITY + PENETRATION TESTING 6.13

View Set

Management A Practical Introduction, Kiniki, CH 9 Homework

View Set

Practice Question Banks 16-30 (Not Required)

View Set

Certified Ethical Hacking (CEH) v.8 Study Guide part 2 (101-200)

View Set