Practice 01 Flashcards

1
Q

An online educational institute uses a three-tier web application and is using AWS X-Ray to trace data between various services. User A is experiencing latency issues using this application and the Operations team has asked you to gather all traces for User A. Which of the following needs to be enabled to get Filtered Output for User A from all other traces?

A. Trace Id
B. Annotations
C. Segment Id
D. Tracing header

A

B. Annotations

Annotations are key-value pairs indexed to use with filter expressions. In the above case, traces for a user need to be tracked, for which Annotations can be used along with a Filter expression to find all traces related to that user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer working on an AWS CodeBuild project wants to override a build command as part of a build run to test a change. The developer has access to run the builds but does not have access to the code and to edit the CodeBuild project.
What process should the Developer use to override the build command?

A. Update the buildspec.yml configuration file that is part of the source code and run a new build.
B. Update the command in the Build Commands section during the build run in AWS console
C. Run the start build AWS CLI command with buildspecOverride property set to the new buildspec.yml file
D. Update the buildspec property in the StartBuild API to override the build command during the build run

A

C. Run the start build AWS CLI command with buildspecOverride property set to the new buildspec.yml file

Since the developer can run the build, he can run the build by changing the parameters from the command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You are using AWS SAM to define a Lambda function and configure CodeDeploy to manage deployment patterns. With the new Lambda function working as per expectation, which of the following will shift traffic from the original Lambda function to the new Lambda function in the shortest time frame?

A. Canary10Percent5Minutes
B. Linear10PercentEvery10Minutes
C. Canary 10Percent15Minutes
D. Linear10PercentEvery5Minute

A

A. Canary10Percent5Minutes

With Canary Deployment Preference type, traffic is shifted in two intervals. With Canary10Percent5Minutes, 10 percent of traffic is shifted in the first interval while all remaining traffic is shifted after 5 minutes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A Developer has been asked to create an AWS Elastic Beanstalk environment for a production web application that needs to handle thousands of requests. Currently, the dev environment is running a t1.micro instance.
What is the best way for the developer to provision a new production environment with a m4.large instance of a t1.micro?

A. Use CloudFormation to migrate the Amazon EC2 instance type from t1.micro to m4.large
B. Create a new configuration file with the instance type as m4.large and reference this file when provisioning the new environment
C. Provision a m4.large instance directly in the dev environment and deploy to the new production environment
D. Change the instance type value in the configuration file to m4.large by using the update autoscaling group CLI command

A

B. Create a new configuration file with the instance type as m4.large and reference this file when provisioning the new environment

Configuration options can be saved in configurations and configuration files. Settings in configuration files are not applied directly to the environment and cannot be removed without modifying the configuration files and deploying a new application version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Your team has been instructed to deploy a Microservice and an ETL based application onto AWS. There is a requirement to manage the containerization of the application using Docker. Which of the following would be the ideal way to implement this with the least amount of administrative effort?

A. Use AWS OpsWorks
B. User Elastic Container Service
C. Deploy Kubernetes on EC2 instances
D. Use the CloudFormation service

A

B. User Elastic Container Service

ECS is fully managed container orchestration service.

C is incorrect because hosting Kubernetes on EC2 will incur more administrative headache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You are developing an application that will be comprised of the following architecture:
A set of EC2 instances to process messages
These instances will be spun up by an Autoscaling group
SQS queues to maintain processing messages
There will be two pricing tiers.

How will you ensure the premium customers’ messages are given preference?
A. Create 2 Autoscaling groups, one for normal and one for premium customers
B. Create 2 sets of EC2 instances, one for normal and one for premium customers
C. Create 2 SQS queues, one for normal and one for premium customers
D. Create 2 Elastic Load Balancers, one for normal and one for premium customers

A

C. Create 2 SQS queues, one for normal and one for premium customers

Messages can be processed by the application from high priority queue first.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Your team has been instructed to develop a completely new solution for AWS. Currently, you have a limitation on the tools available to manage the complete lifecycle of the project. Which of the following services from AWS could help you handle all aspects of development and depolyment?

A. AWS CodePipeline
B. AWS CodeBuild
C. AWS CodeCommit
D. AWS CodeStar

A

D. AWS CodeStar

CodeStar allows you to quickly develop, build, and deploy applications on AWS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You are using S3 buckets to store images. These S3 buckets invoke a lambda function on upload. The Lambda function creates thumbnails of the images and stores them in another S3 bucket. An AWS CloudFormation template is used to create the Lambda function with the resource “AWS::Lambda::Function”. Which of the following attributes i the method name that the Lambda calls to execute the function?

A. FunctionName
B. Layers
C. Environment
D. Handler

A

D. Handler

The handler is the name of the method within code that Lambda calls to execute the function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In API Gateway, when a stage variable is used as part of an HTTP integration URL, which of the following are correct ways of defining a “subdomain” and the “path”?

A. http://example.com/${<variable_name>}/prod
B. http://example.com/${stageVariables.<variable_name>}/prod
C. http://${stageVariables.<variable_name>}.example.com/dev/operation
D. http://${stageVariables}.example.com/dev/operation
E. http://${<variable_name>}.example.com/dev/operation
F. http://example.com/${stageVariables}/prod</variable_name></variable_name></variable_name></variable_name>

A

B. http://example.com/${stageVariables.<variable_name>}/prod
C. http://${stageVariables.<variable_name>}.example.com/dev/operation</variable_name></variable_name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Company B is writing 10 items to the Dynamo DB table every second. Each item is 15.5 kb in size. What would be the required provisioned write throughput for best performance?

A. 10
B. 160
C. 155
D. 16

A

B. 160

When working with write capacity, the rule is to divide the item by 1kb. Hence, 15.5 divided by 1, is 15.5. Round off to the nearest 1kb value, which is 16. Since we are writing 10 items per second, multiply 10 * 16 = 160

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A reputed pharma company has deployed its updated dealer network application on a bunch of EC2 instances. Using CloudWatch Logs to monitor the application logs, their IT team wishes to search for missing files or resources at particular positions in the code and report that data to CloudWatch metric, which can then be monitored. Which of the following measures need to be used to fulfill the requirement?

A. Set up & install cloudwatch agent on EC2 to send logs for CloudWatch to monitor
B. Create a custom role in IAM with relevant write permissions & associate them with EC2 instances. Install Cloudwatch agent on EC2 instances. Create log groups in CloudWatch Logs through the console along with CloudWatch Agent configuration file and use filters to search for 404 errors
C. Application logs cannot be monitored by CloudWatch
D. EC2 instances can directly send application logs to CloudWatch

A

B. Create a custom role in IAM with relevant write permissions & associate them with EC2 instances. Install Cloudwatch agent on EC2 instances. Create log groups in CloudWatch Logs through the console along with CloudWatch Agent configuration file and use filters to search for 404 errors

More setup is needed than just installing the agent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

An enterprise gaming company has recently launched its new Soccer game and wished to bring scalability, availability, and better performance in terms of durability and consistency. The existing setup is using Redis but facing latency and throughput issues. You are required to propose an upgrade or a new solution/service to meet and support more than 100 million request per second as part of their requirements for the new game.

A. Upgrade the EC2 instances from m6in.4xlarge to m6in.24xlarge
B. Introduce Amazon Memory DB for Redis-based architecture bringing in ultrafast performance and Multi-AZ durability
C. Introduce Multi-AZ setup and migrate the DB to DynamoDB using AWS Migration Service. Use DynamoDb Accelerator (DAX) - this will help in increasing the read performance from milliseconds to microseconds even if there are millions of requests per second.
D. Migrate the entire architecture to AWS EKS which is fully managed Kubernetes service that automatically manages the availability and scalability of the application

A

B. Introduce Amazon Memory DB for Redis-based architecture bringing in ultrafast performance and Multi-AZ durability

Since the company already has a Redis setup, migrating or introducing Amazon Memory DB for Redis can enhance and bring in data durability, consistency, and recoverability since it uses distributed transactional log features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Mary is a Docker expert and has deployed multiple projects using AWS Cloud9 as the preferred IDE along with AWS CodeStar to streamline the CI/CD pipelines. She is currently struggling to open a new environment for a new project which involved workloads on Docker. She is unable to connect to the EC2 environment in the project VPS which has been set up using the IPV4 CIDR block of 172.17.0.0/16. Which of the following will solve the problem?

A. Enable Advance Network for EC2 instance which is used for AWS Cloud9
B. Configure a new VPC for the instance backing the EC2 environment using 192.168.0.0/16 CIDR block
C. Upgrade the EC2 instance backing the environment from t2.micro to t3.large and try reconnecting
D. Change the IP address range of the existing VPC to 172.17.0.0/18

A

B. Configure a new VPC for the instance backing the EC2 environment using 192.168.0.0/16 CIDR block

Docker uses default bridge on 172.17.0.0/16 for container networking. If VPC uses the same address, an IP conflict can occur. The address cannot be changed for an existing VPC, so a new VPC must be created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A leading Automobile dealer company that is expanding globally is facing problems to ensure a consistent state of provisioning and maintenance of environments. Their current architecture is rolling out Kubernetes jobs through AWS EKS using Spot instances to create new microservices for a new environment requested by a user. However, Spot instances are deleting the underlying nodes and jobs are getting terminated, hence disrupting the entire chain of environment creation for different business units. Select two options:

A. Replace Spot instances with Reserved which will ensure that the underlying infrastructure will not get terminated
B. Integrate AWS API Gateway which will trigger Lambda functions to spin off new instances
C. Integrate AWS SNS with SQS and Dead Letter Queue which will ensure job requests are being managed, stored, and processed seamlessly. DLQ will further enhance and bring in overall consistency
D. Integrate CloudWatch monitoring along with Lambda, to spin off new instances in the event of nodes that are getting terminated.

A

B. Integrate AWS API Gateway which will trigger Lambda functions to spin off new instances
C. Integrate AWS SNS with SQS and Dead Letter Queue which will ensure job requests are being managed, stored, and processed seamlessly. DLQ will further enhance and bring in overall consistency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The DevOps team at DevHub Inc is trying to deploy an application using AWS CodeDeploy and has also integrated AWS AutoScaling service which will ensure it always has the correct number of EC2 instances available to handle the load for deployments. AWS CodeDeploy configuration has been setup in such a way that multiple deployment groups have been associated with each AWS AutoScaling group. The deployment process is running as expected, but the deployment is failing. Which will help correct the problem and ensure that the application deployment on EC2 instances completes successfully?

A. Change the deployment group configuration so that only one deployment group is associated with each AWS AutoScaling group
B. Let AWS CodeDeploy configure the AutoScaling lifecycle hooks instead of using manual configuration
C. Change the timeout period of the script for the lifecycle event in the AppSpec file to 60 minutes. Because CodeDeploy has a one-hour timeout for the CodeDeploy agent to respond to pending deployments, it can take up to 60 minutes for each instance to time out.
D. Use AutoScaling notifications to keep track of terminated EC2 instances that have not been set up.

A

A. Change the deployment group configuration so that only one deployment group is associated with each AWS AutoScaling group
B. Let AWS CodeDeploy configure the AutoScaling lifecycle hooks instead of using manual configuration

Recommendation is to not setup or modify these hook manually since CodeDeploy can do it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

For a new restaurant recommendation application, the customer is looking for monitoring and scheduling features for their deployments in a measured and gradual way. Additionally, the system should incorporate wait time post deployment of new feature roll outs, alerts, and notifications, and faster rollback capabilities. Recommend the appropriate service, deployment strategy, and related configuration:

A. Use AWS AppConfig Managed Service which allows configuring different deployment strategies involving ways to configure wait time post deployments, schedule the new feature releases through their Feature Flag feature advantage, and integrate with CloudWatch for Alerts and notifications.
B. Incorporate CI/CD pipelines and services like AWS CodeDeploy and AWS CodePipeline which will automate the deployment process lifecycle along with alerts and notifications.
C. Migrating the environment to AWS ECS Service which supports the use of a Linear Deployment strategy where traffic is shifted in equal increments with an equal number of minutes between each increment.
D. Shift to Blue/Green Deployment strategy which enabled to launch an ew application version alongside the old version. This strategy also monitors and tests the new version before rerouting traffic to it, and rolling back on issue detection.

A

A. Use AWS AppConfig Managed Service which allows configuring different deployment strategies involving ways to configure wait time post deployments, schedule the new feature releases through their Feature Flag feature advantage, and integrate with CloudWatch for Alerts and notifications.

AWS AppConfig handles all the requirements: add timers, schedule new features, and faster rollbacks.

17
Q

Before deploying an application to production, the developer team needs to test the application latency locally using X-ray daemon. For this testing, they want to skip checking Amazon EC2 instance metadata. Which configuration settings can be done with daemon?

A. ~/xray-daemon$./xray-r
B. ~/xray-daemon$./xray-t
C. ~/xray-daemon$./xray-b
D. ~/xray-daemon$./xray-o

A

D. ~/xray-daemon$./xray-o

18
Q

You are creating a customized Elastic Beanstalk platform using the Packer template. Which parameters need to be specified in a custom_platform.json file for creating a custom platform?

A. source_ami
B. Elastic IP of EC2 instance
C. Version of the platform
D. Availability Zone
E. Region

A

A. source_ami
E. Region

Source ami depends on the flavour. This is a base operating system used to create a custom AMI. Can be: Amazon Linux AMI, ubuntu1604, rhe17 and rhe16

The region should be the same as the region from which the AMI of the EC2 instance is copied

19
Q

Your team is developing a solution that will make use of DynamoDB tables. Due to the nature of the application, the data is needed across a couple of regions. Which of the following would help reduce latency of requests to DynamoDB from different regions?

A. Enable Multi-AZ for DynamoDB tables
B. Enable global tables for DynamoDB
C. Create Indexes for the table
D. Increase the read and write throughput for the table

A

B. Enable global tables for DynamoDB

Global tables provide a fully managed solution for deploying multi-region, multi-master database without building and maintaining your own replication solution

20
Q

Your company has large data sets that need to be streamed directly into Amazon S3. Which would be the easiest way:

A. Kinesis Data Streams
B. Kinesis Data Firehose
C. AWS Redshift
D. AWS DynamoDB

A

B. Kinesis Data Firehose

Firehose is a fully managed service for delivering real-time streaming data to destinations such as S3, Redshift, Elastic search, and Splunk

Kinesis Data stream is partially valid, but since the data needs to go to S3, Firehose can be used instead

21
Q

You are working on deploying a new Amazon Beanstalk environment with a multi-container Docker platform. Which configuration file can be used to specify Amazon EC2 container instance and file volumes for multi-container Docker platform?

A. Use Docker-compose.yml version 2 file
B. Use Dockerrun.aws.json version 2 file
C. Use Docker-compose.yml version 1 file
D. User Dockerrun.aws.json version 1 file

A

B. Use Dockerrun.aws.json version 2 file

This file can be used to specify EC2 container instance and file volumes for multi-containers (version 1 is used for single container) It include three sections:
AWSEBDOckerrunVersion
ContainerDefinitions
Volumes

Docker-compose.yml files are used to deploy the docker image, it has no versions