Domain: Deployement

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following statements is true of AWS Elastic Beanstalk?

1)It enables you to deploy and manage applications in the AWS Cloud with little to no infrastructure knowledge. 2)It automatically handles the deployment details of an uploaded application. 3)You can interact with it by using the AWS Management Console, AWS Command Line Interface (CLI), or the eb Command Line Interface.

AWS recommends that you use Multipart Upload for files larger than _____.

100MB

How long can a message be retained in an SQS Queue?

14 days

What is the size of one unit of read capacity?

4KB

What is the largest size file you can transfer to S3 using a PUT operation?

5GB

What is the maximum size of an S3 object?

5TB

Which of the following statements is correct?

An EBS backed instance can be stopped and restarted.

An application connects to an external third-party service with API keys being managed by AWS Secrets Manager. The development team uses CodeBuild for source code compilation activities in their CI/CD process. Where should the reference to the third-party service API keys be specified?

BuildSpec file EXPLANATION CodeBuild uses the BuildSpec file as a specification of build commands and settings. "secrets-manager" syntax can be used to retrieve API Keys stored in AWS Secrets Manager. Build Environment variables should NOT be used for storing sensitive information as they are displayed in plain text. AppSpec file is used by CodeDeploy to specify and manage deployments.

A developer is making changes to the CloudFormation template used to deploy an application. They would like to know if any existing resources will be deleted or replaced before applying the template updates. What service feature will enable this?

CloudFormation Change Sets

A developer needs to compile Java code to produce a deployment artifact. Which Amazon service can the developer use for this task?

CodeBuild

Which of the following services enables you to automatically build, test and release new software whenever a developer makes an update to their code?

CodePipeline EXPLANATION CodeBuild only builds your code, it won't deploy it to your environment. CloudFormation is used to deliver Infrastructure As Code. CodeCommit manages your source code. CodeDeploy can be used to deploy code, but in isolation, it cannot create an automated release process. CodePipeline automates the build, test, and can be used to deploy phases of your release process every time there is a code change, based on the release model you define.

You are developing a Serverless application written in Node.js, which will run on Lambda. During performance testing, you notice that the application is not running as quickly as you would like and you suspect that your Lambda function does not have enough CPU capacity. Which of the following options will improve the overall performance of your function?

Configure more memory for your function EXPLANATION In the AWS Lambda resource model, you choose the amount of memory you want for your function, and are allocated proportional CPU power and other resources.

Which of the following could you NOT achieve using the Amazon SQS Extended Client Library for Java?

Create a new S3 bucket and move a batch of SQS messages into the bucket

You have an application running on a number of Docker containers running on AWS Elastic Container Service. You have noticed significant performance degradation after you made a number of changes to the application and would like to troubleshoot the application end-to-end to find out where the problem lies. What should you do?

Deploy the AWS X-Ray daemon as a new container alongside your application EXPLANATION Within a micro-service architecture, each application component runs as its own service. Micro-services are built around business capabilities, and each service performs a single function. So if you want to add X-Ray to a Dockerized application, it makes the most sense to run the X-Ray daemon in a new Docker container and have it run alongside the other micro-services which make up your application

An organization has adopted a new policy that all services should be built using AWS Serverless technology. Which of the following AWS services could the organization use under this new policy?

DynamoDB Fargate S3

Which of the following are considered to be Serverless?

DynamoDB SNS API Gateway Lambda Kinesis S3

You have been asked to use Elastic Beanstalk to build a number of web servers to use in your development environment, which of the following services can you use?

EC2 Elastic Load Balancer S3 Auto Scaling Group EXPLANATION Except for Lambda, all of the services listed can be used to create a web server farm. AWS Lambda automatically runs your code without requiring you to provision or manage servers. Lambda is generally used for stateless, short-running tasks and is not suitable for long-running tasks like running a web server.

Which of the following statements is correct?

In DynamoDB, a primary key can be a single-attribute partition key In DynamoDB, a primary key can be composite partition/sort key.

What is the CloudFormation helper script cfn-init used for?

Install packages and start/stop services on EC2 instance.

You have deployed your application on EC2 using Elastic Beanstalk. You would like to configure your application to send data to X-Ray. Where should you install the X-Ray daemon?

Install the X-Ray daemon on the EC2 instances inside your Elastic Beanstalk environment.

Which of the following statements about a standard SQS queue is true:

Messages will be delivered one or more times and message delivery order is indeterminate. EXPLANATION With standard queues, SQS will deliver each message at least once, but cannot guarantee the delivery order. Because each message may be delivered more than once, your application should be idempotent by design.

Your application is using Kinesis to ingest data from a number of environmental sensors which continuously monitor for pollution within a 1 mile radius of a local primary school. An EC2 instance consumes the data from the stream using the Kinesis Client Library. You have recently increased the number of shards in your stream to 6 and your project manager is now suggesting that you need to add at least 6 additional EC2 instances to cope with the new shards. What do you recommend?

One worker can process any number of shards, so it's fine if the number of shards exceeds the number of instances EXPLANATION Re-sharding enables you to increase or decrease the number of shards in a stream in order to adapt to changes in the rate of data flowing through the stream. You should ensure that the number of instances does not exceed the number of shards (except for failure standby purposes). Each shard is processed by exactly one KCL worker and has exactly one corresponding record processor, so you never need multiple instances to process one shard. However, one worker can process any number of shards, so it's fine if the number of shards exceeds the number of instances.

You need to push a docker image to your Amazon ECR repository called my-repository located in us-east-1. Which of the following commands do you need to run in order to achieve this?

Run: docker tag -i my-image latest Run: aws ecr get-login --no-include-email --region us-east-1 Run the docker login command that was returned in the previous step. Then run: docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-repository EXPLANATION The aws ecr get-login command provides an authorization token that is valid for 12 hours. You need to run the command which was returned by the ecr get-login command to authorize you to push images to the ECR repository.

Your application regularly sends a number of large messages exceeding 1GB in size to SQS. You would like to store these messages in S3 rather than in SQS. Which of the following can you use to manage large SQS messages stored in S3?

SQS Extended Client Library for Java

A business-critical application is deployed using CloudFormation. The team would like to prevent accidental deletion of the stack. How can this be achieved most efficiently?

Set Stack Termination Protection to Enable. EXPLANATION Termination Protection stack option can be enabled to prevent accidental deletion of an entire CloudFormation stack. It is possible to use IAM policy to prevent deletion of a CloudFormation stack, however, this is not the optimal solution from operations and management perspective. The DeletionPolicy CloudFormation attribute applies to individual resources, not an entire stack.

A business-critical application is deployed using CloudFormation. The team would like to prevent accidental deletion of the stack. How can this be achieved most efficiently?

Set Stack Termination Protection to Enable. EXPLANATION Termination Protection stack option can be enabled to prevent accidental deletion of an entire CloudFormation stack. It is possible to use IAM policy to prevent deletion of a CloudFormation stack, however, this is not the optimal solution from operations and management perspective. The DeletionPolicy CloudFormation attribute applies to individual resources, not an entire stack. There is no DeletionProtection attribute in CloudFormation.

You are developing a completely serverless application using Lambda and API Gateway. You need a place to persist data as key-value pairs and your application will need low latency access to the data. Which of the following is the best option for storing this data?

Store the data in a DynamoDB table EXPLANATION DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale.

Your distributed application sends and receives a number of large SQS messages, each of which can be up to 2GB in size. You are finding that the messages in one particular queue are getting processed a few seconds faster than expected which is causing problems in your application. The application architect has asked you to introduce a sleep period of 5 seconds which should apply to all the messages in the queue and you have also been asked to avoid storing large amounts of data in SQS. Which of the following changes do you recommend?

Store the large messages on S3 Use an SQS delay queue to let you postpone the delivery of SQS messages by 5 seconds EXPLANATION Delay queues let you postpone the delivery of new messages to a queue for a number of seconds. If you create a delay queue, any messages that you send to the queue remain invisible to consumers for the duration of the delay period. You can use Amazon S3 and the Amazon SQS Extended Client Library for Java to manage Amazon SQS messages. This is especially useful for storing and consuming messages up to 2 GB in size. Unless your application requires repeatedly creating queues and leaving them inactive or storing large amounts of data in your queue, consider using Amazon S3 for storing your data.

Under what circumstances would you use an SQS Delay Queue?

To postpone the delivery of new messages to a queue for a number of seconds

You are developing a website which allows customers to purchase tickets to popular sporting events. Your application uses S3 for static web hosting, Lambda for business logic, stores transaction data in RDS and uses DynamoDB for product and stock information. After the customer has paid for their purchase, a message is sent to an SQS queue to trigger a confirmation email to be sent out to the customer including an e-ticket for their chosen event. You want to send out the email as soon as the payment has been processed, however during testing you discover that the confirmation emails are being processed a few seconds before the stock control database has finished updating. This sometimes results in selling the same ticket twice. How can you quickly fix this without re-engineering the application?

Use an SQS delay queue to let you postpone the delivery of SQS messages by a few seconds EXPLANATION Delay queues let you postpone the delivery of new messages to a queue for a number of seconds. If you create a delay queue, any messages that you send to the queue remain invisible to consumers for the duration of the delay period. The default (minimum) delay for a queue is 0 seconds. The maximum is 15 minutes.

You are developing a social media messaging and photo-sharing application which consists of a web front end, with persistent data stored in S3 and RDS. Which of the following instance pricing models should you choose to make running this application as cost-effective as possible?

Use reserved instances for the database Use Spot instances for the web servers EXPLANATION Reserved instances provide a significant discount compared to running instances On-Demand. You can take advantage of Spot Instances to run and scale applications such as stateless web services, image rendering, big data analytics, and massively parallel computations.

Which of the following statements relating are correct in relation to DynamoDB?

A Local Secondary Index is an index that has the same partition key as the table, but a different sort key to the table. You can add a Global Secondary Index to an existing table

Your 'forums' table has a primary key of 'comment_id'. Using DynamoDB, you're able to query the data based on the 'comment_id' primary key. You need to be able to query the forums table by userId. What would you add to the table during table creation time?

A secondary index

You are working on an application which is made up of a number of Lambda functions as well as API Gateway endpoints. Which of the following technologies would you use to build and deploy this application in AWS?

AWS Serverless Application Model CLI CloudFormation EXPLANATION CloudFormation and the AWS SAM CLI can be used to deploy serverless applications. Use the Transform section of the CloudFormation template to specify the serverless resources you would like to deploy.

You are creating a DynamoDB table to manage your customer orders, which of the following attributes would make a good Sort Key?

OrderDate EXPLANATION A well designed Sort key allows you to retrieve groups of related items and query based on a range of values, e.g. a range of dates.

A developer is creating a CloudFormation template to deploy an application stack. The administrator password for the application needs to be configured at CloudFormation runtime. What CloudFormation section should be used for this requirement?

Parameters Explaination: CloudFormation template parameters section is used to pass input values to the template. The template parameters can be set to custom values when the template is used to create a new stack. A parameter for the administrator password can be used to meet the question requirement. Metadata section is used to provide information about the template. Mappings section is used to define key and matching value mapping pairs. Resources section is used to specify resources that constitute the stack and need to be provisioned by the template.

You have deployed a new version of your Lambda function, however during testing, you notice that your application is not behaving as expected. How can you roll back to the previous version of your code?

Remap the PROD alias to point to the previous version of your function

You are a developer running an application on AWS Elastic Beanstalk. You are implementing an application update and need to use a deployment policy. The requirements are to maintain full capacity, deploy five instances at once for the new version, and to terminate instances running the old version once the new instances are running successfully. How would you implement this deployment policy?

Set the deployment policy as Rolling with Additional Batch. Set the batch size type as Fixed, and the batch size as 5. EXPLANATION To maintain full capacity during deployments, you can configure your environment to launch a new batch of instances before taking any instances out of service. This option is known as a rolling deployment with an additional batch. When the deployment completes, Elastic Beanstalk terminates the additional batch of instances.

Your organization is developing a CI/CD environment to improve software delivery of your applications. It has already adopted a plan to execute the various phases of the CI/CD pipeline from continuous integration to continuous deployment. There are now discussions around restructuring the team make-up to implement a CI/CD environment. How would you recommend creating developer teams as a best practice to support this change in the long run?

Set up an application team to develop applications. Set up an infrastructure team to create and configure the infrastructure to run the applications. Set up a tools team to build and manage the CI/CD pipeline.

You are developing a website that allows fee-paying users to access video rentals on demand and for a limited time. How would you design this application?

Store the videos in S3 Enable users to access the content using CloudFront with signed URLs EXPLANATION Using CloudFront, you can distribute private content using a signed URL that is valid for a limited time. Signed URLs that are valid for such a short period are good for distributing content on-the-fly to a user for a limited purpose, such as distributing movie rentals or music downloads to customers on demand. If your signed URLs will be valid for just a short period, you will probably want to generate them automatically using an application that you develop. When the user starts to download a file or starts to play a media file, CloudFront compares the expiration time in the URL with the current time to determine whether the URL is still valid.

A developer is deploying a new application to ECS. The application requires permissions to send messages to an SQS queue. Which role should the developer apply the policy to so that the application can access the SQS queue?

The execution role attached to the ECS Task.

A developer is deploying a new application to ECS. The application requires permissions to send messages to an SQS queue. Which role should the developer apply the policy to so that the application can access the SQS queue?

The execution role attached to the ECS Task. EXPLANATION The policy must be attached to the ECS Task's execution role to allow the application running in the container access SQS.

Which section of the AWS Serverless Application Model template would you use to describe the configuration of a Lambda function and an API Gateway endpoint, if you were deploying your application using AWS SAM?

Transform EXPLANATION Use the Transform section to describe your Serverless functions when using the serverless application model. Under the Transform section, you define the resources you want to deploy.

You have deployed an application using Elastic Beanstalk and your code is running in a Docker container. What is the process for upgrading this application?

Upload a zip file containing the new version of your code using the "Upload and Deploy" button in the ElasticBeanstalk console EXPLANATION When you use the Elastic Beanstalk console to deploy a new application or an application version, you'll need to upload a source bundle. Your source bundle must consist of a single ZIP file or WAR file which does not exceed 512 MB. By using Docker with Elastic Beanstalk, you have an infrastructure that automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring.

You are using CloudFormation to build a number of different application environments to host development, test, UAT, pre-production and production stacks. Your application is comprised of web servers, load balancers, application servers and databases each web server, load balancer and database needs to be configured identically across all environments. How can you achieve this with CloudFormation?

Use a CloudFormation Nested Stack EXPLANATION Nested stacks provide the ability to configure multiple elements within your environment while reducing duplication of code. As your infrastructure grows, common patterns can emerge in which you declare the same components in multiple templates. You can separate out these common components and create dedicated templates for them. Then use the resource in your template to reference other templates, creating nested stacks.

You are developing a gaming website which scores all players scores in a DynamoDB table. You are using a Partition key of user_ID and a Sort Key of game_ID as well as storing the user_score which is the user's highest score for the game and also a timestamp. You need to find a way get the top scorers for each game, who have scored over 50,000 points. Which of the following will allow to to find this information in the most efficient way?

Use a local secondary index with a partition key of user_ID and a sort key of user_score

Your application needs to process large numbers of job requests and you need to ensure that they are processed in order, and that each request is processed only once. How would you deploy SQS to achieve this end?

Use an SQS FIFO queue to process the jobs.

Your application is using Kinesis to ingest click-stream data relating to your products from a variety of social media sites. Your company has been trending this quarter because a high profile movie star has recently signed a contract to endorse your products. As a result, the amount of data flowing through Kinesis has increased, causing you to increase the number of shards in your stream from 4 to 6. The application consuming the data runs on a single EC2 instance in us-east-1a with a second instance in us-east-1b which is used as a cold standby in case the primary instance fails. How many consumer instances will you now need in total to cope with the increased number of shards?

1 instance in us-east-1a and 1 instance in us-east-1b EXPLANATION Re-sharding enables you to increase or decrease the number of shards in a stream in order to adapt to changes in the rate of data flowing through the stream. You should ensure that the number of instances does not exceed the number of shards (except for failure standby purposes). Each shard is processed by exactly one KCL worker and has exactly one corresponding record processor, so you never need multiple instances to process one shard. However, one worker can process any number of shards, so it's fine if the number of shards exceeds the number of instances


Kaugnay na mga set ng pag-aaral

Lab 14-3: Working in Event Viewer

View Set

Ch.4 Ethics & Ethical Reasoning A conception of right and wrong is:

View Set

CISSP - Secure Network Architecture & Components

View Set

PP: RNSG 1538 Sexuality Mastery Quiz

View Set

Anthropology 101:Final Exam-Unit 2 Guide

View Set

Lesson 4 Estructura 4.1 Practica adonde van

View Set

MGMT 365 Chapter 5 Connect Test Questions

View Set

Chapter 49: Assessment and Management of Patients With Hepatic Disorders

View Set