Sei sulla pagina 1di 17

AWS DevOps Pro notes

STUDY

Flashcards

Learn

Write

Spell

Test
PLAY

Match

Gravity

You are in charge of designing a number of Cloudformation templates


for your organization. You need to ensure that no one can accidentally
update the production based resources on the stack during a stack
update. How can this be achieved in the most efficient way?

Click card to see the


definition 👆
Use a Stack based policy to protect the production based resources.

Click again to see the term


👆
Cloudformation template, You want to ensure that the stack creation only shows the status of
CREATE_COMPLETE after all resources defined in the stack are up and running. How can you
achieve this?

Click card to see the


definition 👆
C. Use the CreationPolicy to ensure it is associated with the EC2 Instance resource.
D. Use the CFN helper scripts to signal once the resource configuration is complete.
Click again to see the term
👆
1/110
Created by
Vinayak_Jois

Terms in this set (110)

You are in charge of designing a number of Cloudformation templates for your


organization. You need to ensure that no one can accidentally update the production
based resources on the stack during a stack update. How can this be achieved in the
most efficient way?
Use a Stack based policy to protect the production based resources.
Cloudformation template, You want to ensure that the stack creation only shows the
status of CREATE_COMPLETE after all resources defined in the stack are up and
running. How can you achieve this?
C. Use the CreationPolicy to ensure it is associated with the EC2 Instance resource.
D. Use the CFN helper scripts to signal once the resource configuration is complete.
Automated backup solution in place for EBS Volumes
Use Amazon Data Lifecycle Manager to automate the process.
You are getting requirements for the templates from various departments, such as
the networking , security , application etc. What is the best way to architect these
Cloudformation templates.
Create separate logical templates , for example , a separate template for networking,
security, application etc. Then nest the relevant templates.
DynamoDB Table with thousands of users from 3rd party identity providers such as
Google, Face Book, Twitter. Best way to provide access to their own tables
1. Use Web identity federation and register your application with a third-party identity
provider such as Google, Amazon, or Facebook.
2. Create an IAM role which has specific access to the DynamoDB table.
You are required to make changes to the stack resources every now and then based
on the requirement for Cloudformation Templates. How can you check the impact of
the change to resources in a cloudformation stack before deploying changes to the
stack?
Use Cloudformation change sets to check for the impact to the changes
Upgrade to remove adverts
Only ₹83.25/month
A Classic Load Balancer can span across AWS OpsWorks Stacks layers?
No.
To use Elastic Load Balancing with a stack, you must first create one or more load
balancers in the same region
· You can attach only one load balancer to a layer.
· Each load balancer can handle only one layer.
· AWS OpsWorks Stacks does not support Application Load Balancer. You can only
use Classic Load Balancer with AWS OpsWorks Stacks.
How to deploy security updates on Opsworks Stack servers?
1. Create and start new instances to replace your current online instances. Then
delete the current instances.
2. On Linux-based instances in Chef 11.10 or older stacks, run the Update
Dependencies stack command.
Which of the following tools for EC2 can be used to administer instances without the
need to SSH or RDP into the instance.
Run Command
An application is currently writing a large number of records to a DynamoDB table in
one region. There is a requirement for a secondary application to just take in the
changes to the DynamoDB table every 2 hours and process the updates accordingly.
Which of the following is an ideal way to ensure the secondary application can get
the relevant changes from the DynamoDB table.
Use DynamoDB streams to monitor the changes in the DynamoDB table.

A DynamoDB stream is an ordered flow of information about changes to items in an


Amazon DynamoDB table. When you enable a stream on a table, DynamoDB
captures information about every modification to data items in the table.

Whenever an application creates, updates, or deletes items in the table, DynamoDB


Streams writes a stream record with the primary key attribute(s) of the items that
were modified. Astream record contains information about a data modification to a
single item in a DynamoDB table. You can configure the stream so that the stream
records capture additional information, such as the "before" and "after" images of
modified items.
Cloudformation templates which takes in a database password as a parameter. How
can you ensure that the password is not visible when anybody tries to describes the
stack
Use the NoEcho property for the parameter value.
Cloudformation helper scripts can help install packages on EC2 resources.
cfn-init
Basic stages of a CI/CD Pipeline
1. Source Control
2. Build
3. Staging
4. Production
Debugging the creation of Cloudformation stack resources
B. Use the AWS CloudFormation console to view the status of your stack.
C. See the logs in the /var/log directory for Linux instances
Continuous Delivery Services for Cloudformation
AWS CodePipeline
CLI commands can be used to describe the stack resources.
aws cloudformation list-stack-resources
AWS Audit, Best way to provide access to auditor
Create an IAM user who will have read-only access to your AWS VPC infrastructure
and provide the auditor with those credentials.
Benefits when you implement a Blue Green deployment
A. Near zero-downtime release for new changes
B. Better rollback capabilities
C. Good turnaround time for application deployments
Upgrade to remove adverts
Only ₹83.25/month
DynamoDB Trotoling
1. Monitor the ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits
metric using Cloudwatch.
2.Create a Cloudwatch alarm which would then send a trigger to AWS Lambda to
increase the Read and Write capacity of the DynamoDB table
AWS services as targets for CloudWatch Events
· Amazon EC2 instances

· AWS Lambda functions

· Streams in Amazon Kinesis Streams

· Delivery streams in Amazon Kinesis Firehose

· Amazon ECS tasks

· SSM Run Command

· SSM Automation

· Step Functions state machines

· Pipelines in AWS CodePipeline

· Amazon Inspector assessment templates

· Amazon SNS topics

· Amazon SQS queues

· Built-in targets

· The default event bus of another AWS account


How to control the application version limit in Elastic beanstalk?
...
Deploying applications to Elastic Beanstalk
When you use the AWS Elastic Beanstalk console to deploy a new application or an
application version, you'll need to upload a source bundle. Your source bundle must
meet the following requirements:

· Consist of a single ZIP file or WAR file (you can include multiple WAR files inside
your ZIP file)

· Not exceed 512 MB


· Not include a parent folder or top-level directory (subdirectories are fine)
Autoscaling Group changing smaller instances to larger instance types.
Create a new launch configuration with the new instance type and update your
Autoscaling Group.
Elastic Load balancer time intervals access logs get produced
5 minutes or 60 minutes
You are in charge of an application that uses EC2, ELB and Autoscaling. You have
been requested to get the ELB access logs. When you try to access the logs , you
can see that nothing has been recorded in S3. Why is this the case?
By default ELB access logs are disabled.
Implement a lifecycle hook in Autoscaling , by default what is the time limit in which
the instance will be a pending state
60 Minutes
Further processing of Cloudwatch logs ideally
A. Stream the log data to Amazon Kinesis for further processing
B. Send the log data to AWS Lambda for custom processing
C. Stream the log data into Amazon Elasticsearch for any search analysis required.
Tools available for sending log data from EC2 Instances
...
Reliable and durable logging solution to track changes made to your AWS resources
Create a new CloudTrail trail with one new S3 bucket to store the logs and with the
global services option selected. Use IAM roles S3 bucket policies and Multi Factor
Authentication (MFA) Delete on the S3 bucket that stores your logs.
Container for metrics in Cloudwatch
Namespace
Not a supported platform for the Elastic beanstalk service
...
Supported platforms for Elastic beanstalk
Packer Builder
Single Container Docker
Multicontainer Docker
Preconfigured Docker
Go
Java SE
Java with Tomcat
.NET on Windows Server with IIS
Node.js
PHP
Python
Ruby
Fastest deployment method for changes to the Elastic Beanstalk environment
All at Once
host a custom application which has custom dependencies
Package the application and dependencies with Docker, and deploy the Docker
container with Elastic Beanstalk
Elastic beanstalk deployment method with minimal downtime
Blue/Green
Not a lifecycle event in Opswork
Uninstall
Lifecycle events of Opsstack
1) Setup - This event occurs after a started instance has finished booting.

2) Configure - This event occurs on all of the stack's instances when one of the
following occurs:

a) An instance enters or leaves the online state.

b) You associate an Elastic IP address with an instance or disassociate one from an


instance.

c) You attach an Elastic Load Balancing load balancer to a layer, or detach one from
a layer.

3) Deploy - This event occurs when you run a Deploy command, typically to deploy
an application to a set of application server instances.

4) Undeploy - This event occurs when you delete an app or run an Undeploy
command to remove an app from a set of application server instances.

5) Shutdown - This event occurs after you direct AWS OpsWorks Stacks to shut an
instance down but before the associated Amazon EC2 instance is actually
terminated
By default in Opswork , how many application versions can you rollback up to?
4
You have defined a Linux based instance stack in Opswork. You now want to attach
a database to the Opswork stack. Which of the below is an important step to ensure
that the application on the Linux instances can communicate with the database
Add the appropriate driver packages to ensure the application can work with the
database
You have an Opswork stack defined with Linux instances. You have executed a
recipe , but the execution has failed. What is one of the ways that you can use to
diagnose what was the reason why the recipe did not execute correctly.
Log into the instance and check if the recipe was properly configured
Long-term storage for backups with data readily available
S3 - IA
A company is building a two-tier web application to serve dynamic transaction-based
content. The data tier is leveraging an Online Transactional Processing (OLTP)
database. What services should you leverage to enable an elastic and scalable web
tier?
Elastic Load Balancing, Amazon EC2, and Auto Scaling
You have an ELB on AWS which has a set of web servers behind them. There is a
requirement that the SSL key used to encrypt data is always kept secure. Secondly
the logs of ELB should only be decrypted by a subset of users. Which of these
architectures meets all of the requirements?
Use Elastic Load Balancing to distribute traffic to a set of web servers, configure the
load balancer to
perform TCP load balancing, use an AWS CloudHSM to perform the SSL
transactions, and write your
web server logs to a private Amazon S3 bucket using Amazon S3 server-side
encryption.
You recently encountered a major bug in your web application during a deployment
cycle. During this failed deployment, it took the team four hours to roll back to a
previously working state, which left customers with a poor user experience. During
the post-mortem, you team discussed the need to provide a quicker, more robust
way to roll back failed deployments. You currently run your web application on
Amazon EC2 and use Elastic Load Balancing for your load balancing needs.
Which technique should you use to solve this problem?
...
You are designing an application that contains protected health information. Security
and compliance requirements for your application mandate that all protected health
information in the application use encryption at rest and in transit. The application
uses a three-tier architecture where data flows through the load balancer and is
stored on Amazon EBS volumes for processing and the results are stored in Amazon
S3 using the AWS SDK.
Which of the following two options satisfy the security requirements? (Select two)
Use TCP load balancing on the load balancer. SSL termination on the Amazon EC2
instances. OS-level disk encryption on the Amazon EBS volumes and Amazon S3
with server-side encryption.

Use SSL termination on the load balancer an SSL listener on the Amazon EC2
instances, Amazon EBS encryption on EBS volumes containing PHI and Amazon S3
with server-side encryption.
You have an AWS OpsWorks Stack running Chef Version 11.10. Your company
hosts its own proprietary cookbook on Amazon S3, and this is specified as a custom
cookbook in the stack. You want to use an open-source cookbook located in an
external Git repository. What tasks should you perform to enable the use of both
custom cookbooks?
In the AWS OpsWorks stack settings, enable Berkshelf. Create a new cookbook with
a Berksfile that specifies the other two cookbooks. Configure the stack to use this
new cookbook.

To use an external cookbook on an instance, you need a way to install it and


manage any dependencies. The preferred approach is to implement a cookbook that
supports a dependency manager named Berkshelf. Berkshelf works on Amazon EC2
instances, including AWS OpsWorks Stacks instances, but it is also designed to
work with Test Kitchen and Vagrant.
One of your engineers has written a web application in the Go Programming
language and has asked your DevOps team to deploy it to AWS. The application
code is hosted on a Git repository.
Create a new AWS Elastic Beanstalk application and configure a Go environment to
host your application, Using Git check out the latest version of the code, once the
local repository for Elastic Beanstalk is configured use "eb create" command to
create an environment and then use "eb deploy" command to deploy the application.

Write a Dockerfile that installs the Go base image and fetches your application using
Git, Create a new AWS Elastic Beanstalk application and use this Dockerfile to
automate the deployment
The development team has developed a new feature that uses an AWS service and
wants to test it from inside a staging VPC. How should you test this feature with the
fastest turnaround time?
Launch an Amazon Elastic Compute Cloud (EC2) instance in the staging VPC in
response to a development request, and use configuration management to set up
the application. Run any testing harnesses to verify application functionality and then
use Amazon Simple Notification Service (SNS) to notify the development team of the
results
You have a web application that is currently running on a three M3 instances in three
AZs. You have an Auto Scaling group configured to scale from three to thirty
instances. When reviewing your CloudWatch metrics, you see that sometimes your
Auto Scaling group is hosting fifteen instances. The web application is reading and
writing to a DynamoDB-configured backend and configured with 800 Write Capacity
Units and 800 Read Capacity Units. Your DynamoDB Primary Key is the Company
ID. You are hosting 25 TB of data in your web application. You have a single
customer that is complaining of long load times when their staff arrives at the office
at 9:00 AM and loads the website, which consists of content that is pulled from
DynamoDB. You have other customers who routinely use the web application.
Choose the answer that will ensure high availability and reduce the customer's
access times.
Use data pipelines to migrate your DynamoDB table to a new DynamoDB table with
a primary key that is evenly distributed across your dataset. Update your web
application to request data from the new table
You have an I/O and network-intensive application running on multiple Amazon EC2
instances that cannot handle a large ongoing increase in traffic. The Amazon EC2
instances are using two Amazon EBS PIOPS volumes each, and each instance is
identical.
Which of the following approaches should be taken in order to reduce load on the
instances with the least disruption to the application?
Create an AMI from an instance, and set up an Auto Scaling group with an instance
type that has enhanced networking enabled and is Amazon EBS-optimized.
Your public website uses a load balancer and an Auto Scaling group in a virtual
private cloud. Your chief security officer has asked you to set up a monitoring system
that quickly detects and alerts your team when a large sudden traffic increase
occurs. How should you set this up?
Set up an Amazon CloudWatch alarm for the Amazon EC2 NetworkIn metric for the
Auto Scaling group and then use Amazon SNS to alert your team.
As part of your deployment process, you are configuring your continuous integration
(CI) system to build AMIs. You want to build them in an automated manner that is
also cost-efficient. Which method should you use?
...
You have decided that you need to change the instance type of your production
instances which are running as part of an AutoScaling group. The entire architecture
is deployed using CloudFormation Template. You currently have 4 instances in
Production. You cannot have any interruption in service and need to ensure 2
instances are always running during the update?
AutoScalingRollingUpdate
You currently have the following setup in AWS

1) An Elastic Load Balancer


2) Auto Scaling Group which launches EC2 Instances
3) AMIs with your code pre-installed

You want to deploy the updates of your app to only a certain number of users. You
want to have a cost-effective solution. You should also be able to revert back quickly.
Which of the below solutions is the most feasible one?
Create a second ELB, and a new Auto Scaling Group assigned a new Launch
Configuration. Create a new AMI with the updated app. Use Route53 Weighted
Round Robin records to adjust the proportion of traffic hitting the two ELBs.
Your application is currently running on Amazon EC2 instances behind a load
balancer. Your management has decided to use a Blue/Green deployment strategy.
How should you implement this for each deployment?
Create a new load balancer with new Amazon EC2 instances, carry out the
deployment, and then switch DNS over to the new load balancer using Amazon
Route 53 after testing.
You have an application running a specific process that is critical to the application's
functionality, and have added the health check process to your Auto Scaling Group.
The instances are showing healthy but the application itself is not working as it
should. What could be the issue with the health check , since it is still showing the
instances as healthy.
...
You have just recently deployed an application on EC2 instances behind an ELB.
After a couple of weeks, customers are complaining on receiving errors from the
application. You want to diagnose the errors and are trying to get errors from the
ELB access logs. But the ELB access logs are empty. What is the reason for this.
...
You have deployed an application to AWS which makes use of Autoscaling to launch
new instances. You now want to change the instance type for the new instances.
Which of the following is one of the action items to achieve this deployment?
Create a new launch configuration with the new instance type
Your application stores sensitive information on an EBS volume attached to your
EC2 instance. How can you protect your information? Choose two answers from the
options given below
Copy the unencrypted snapshot and check the box to encrypt the new snapshot.
Volumes restored from this encrypted snapshot will also be encrypted.
Create and mount a new, encrypted Amazon EBS volume. Move the data to the new
volume. Delete the old Amazon EBS volume
Which Auto Scaling process would be helpful when testing new instances before
sending traffic to them, while still keeping them in your Auto Scaling Group?
Suspend the process AddToLoadBalancer
Your company has multiple applications running on AWS. Your company wants to
develop a tool that notifies on-call teams immediately via email when an alarm is
triggered in your environment. You have multiple on-call teams that work different
shifts, and the tool should handle notifying the correct teams at the correct times.
How should you implement this solution?
...
You are responsible for your company's large multi-tiered Windows-based web
application running on Amazon EC2 instances situated behind a load balancer.
While reviewing metrics, you've started noticing an upwards trend for slow customer
page load time. Your manager has asked you to come up with a solution to ensure
that customer load time is not affected by too many requests per second. Which
technique would you use to solve this issue?
...
During metric analysis, your team has determined that the company's website during
peak hours is experiencing response times higher than anticipated. You currently
rely on Auto Scaling to make sure that you are scaling your environment during peak
windows. How can you improve your Auto Scaling policy to reduce this high
response time? Choose 2 answers.
Increase your Auto Scaling group's number of max servers.

Push custom metrics to CloudWatch for your application that include more detailed
information about your web application, such as how many requests it is handling
and how many are waiting to be processed.
Management has reported an increase in the monthly bill from Amazon Web
Services, and they are extremely concerned with this increased cost. Management
has asked you to determine the exact cause of this increase. After reviewing the
billing report, you notice an increase in the data transfer cost. How can you provide
management with a better insight into data transfer use?
Deliver custom metrics to Amazon CloudWatch per application that breaks down
application data transfer into multiple, more specific data points.
You have an application consisting of a stateless web server tier running on Amazon
EC2 instances behind load balancer, and are using Amazon RDS with read replicas.
Which of the following methods should you use to implement a self-healing and cost-
effective architecture? Choose 2 answers from the options given below
Set up an Auto Scaling group for the web server tier along with an Auto Scaling
policy that uses the Amazon EC2 CPU utilization CloudWatch metric to scale the
instances.

Use an Amazon RDS Multi-AZ deployment.


You currently run your infrastructure on Amazon EC2 instances behind an Auto
Scaling group. All logs for your application are currently written to ephemeral
storage. Recently your company experienced a major bug in the code that made it
through testing and was ultimately deployed to your fleet. This bug triggered your
Auto Scaling group to scale up and back down before you could successfully retrieve
the logs off your server to better assist you in troubleshooting the bug. Which
technique should you use to make sure you are able to review your logs after your
instances have shut down?
Install the CloudWatch Logs Agent on your AMI, and configure CloudWatch Logs
Agent to stream your logs.
You have a code repository that uses Amazon S3 as a data store. During a recent
audit of your security controls, some concerns were raised about maintaining the
integrity of the data in the Amazon S3 bucket. Another concern was raised around
securely deploying code from Amazon S3 to applications running on Amazon EC2 in
a virtual private cloud. What are some measures that you can implement to mitigate
these concerns? Choose two answers from the options given below.
Add an Amazon S3 bucket policy with a condition statement that requires multi-factor
authentication in order to delete objects and enable bucket versioning

Create an Amazon Identity and Access Management role with authorization to


access the Amazon S3 bucket, and launch all of your application's Amazon EC2
instances with this role.
The project you are working on currently uses a single AWS CloudFormation
template to deploy its AWS infrastructure, which supports a multi-tier web
application. You have been tasked with organizing the AWS CloudFormation
resources so that they can be maintained in the future, and so that different
departments such as Networking and Security can review the architecture before it
goes to Production. How should you do this in a way that accommodates each
department, using their existing workflows?
...
The operations team and the development team want a single place to view both
operating system and application logs. How should you implement this using AWS
services? Choose two from the options below
Using AWS CloudFormation, create a CloudWatch Logs LogGroup and send the
operating system and application logs of interest using the CloudWatch Logs Agent.

Using configuration management, set up remote logging to send events to Amazon


Kinesis and insert these into Amazon CloudSearch or Amazon Redshift, depending
on available analytic tools.
You have the following application to be setup in AWS

1) A web tier hosted on EC2 Instances

2) Session data to be written to DynamoDB

3) Log files to be written to Microsoft SQL Server

How can you allow an application to write data to a DynamoDB table?


Create an IAM role that allows write access to the DynamoDB table
You have been requested to create a rolling deployment solution that is cost-
effective with minimal downtime. How should you achieve this? Choose two answers
from the options below
Re-deploy with a CloudFormation template, define update policies on Auto Scaling
groups in your CloudFormation template

Use UpdatePolicy attribute to specify how CloudFormation handles updates to Auto


Scaling Group resource.
You have an Auto Scaling group of Instances that processes messages from an
Amazon Simple Queue Service (SQS) queue. The group scales on the size of the
queue. Processing Involves calling a third-party web service. The web service is
complaining about the number of failed and repeated calls it is receiving from you.
You have noticed that when the group scales in, instances are being terminated
while they are processing. What cost-effective solution can you use to reduce the
number of incomplete process attempts?
Modify the application running on the instances to put itself into an Auto Scaling
Standby state while it processes a task and return itself to InService when the
processing is complete
Your mobile application includes a photo-sharing service that is expecting tens of
thousands of users at launch. You will leverage Amazon Simple Storage Service
(S3) for storage of the user Images, and you must decide how to authenticate and
authorize your users for access to these images. You also need to manage the
storage of these images. Which two of the following approaches should you use?
Authenticate your users at the application level, and use AWS Security Token
Service (STS) to grant token-based authorization to S3 objects.
Use a key-based naming scheme comprised from the user IDs for all user objects in
a single Amazon S3 bucket.
You have an Auto Scaling group with 2 AZs. One AZ has 4 EC2 instances and the
other has 3 EC2 instances. None of the instances are protected from scale in. Based
on the default Auto Scaling termination policy what will happen?
Auto Scaling will select the AZ with 4 EC2 instances and terminate an instance.
You are doing a load testing exercise on your application hosted on AWS. While
testing your Amazon RDS MySQL DB instance, you notice that when you hit 100%
CPU utilization on it, your application becomes non- responsive. Your application is
read-heavy. What are methods to scale your data tier to meet the application's
needs? Choose three answers from the options given below
Add Amazon RDS DB read replicas, and have your application direct read queries to
them.

Use ElastiCache in front of your Amazon RDS DB to cache common queries

Shard your data set among multiple Amazon RDS DB instances.


You are administering a continuous integration application that polls version control
for changes and then launches new Amazon EC2 instances for a full suite of build
tests. What should you do to ensure the lowest overall cost while being able to run
as many tests in parallel as possible?
...
If your application performs operations or workflows that take a long time to
complete, what service can the Elastic Beanstalk environment do for you?
Manages a Amazon SQS queue and running a daemon process on each instance
You have an Auto Scaling group with an Elastic Load Balancer. You decide to
suspend the Auto Scaling AddToLoadBalancer for a short period of time. What will
happen to the instances launched during the suspension period?
...
You are using Elastic Beanstalk to manage your e-commerce store. The store is
based on an open source e- commerce platform and is deployed across multiple
instances in an Auto Scaling group. Your development team often creates new
"extensions" for the e-commerce store. These extensions include PHP source code
as well as an SQL upgrade script used to make any necessary updates to the
database schema. You have noticed that some extension deployments fail due to an
error when running the SQL upgrade script. After further investigation, you realize
that this is because the SQL script is being executed on all of your Amazon EC2
instances. How would you ensure that the SQL script is only executed once per
deployment regardless of how many Amazon EC2 instances are running at the time?
Use a "Container command" within an Elastic Beanstalk configuration file to execute
the script, ensuring that the "leader only" flag is set to true.
You have a multi-docker environment that you want to deploy to AWS. Which of the
following configuration files can be used to deploy a set of Docker containers as an
Elastic Beanstalk application?
Dockerrun.aws.json
You work for a company that has multiple applications which are very different and
built on different programming languages. How can you deploy applications as
quickly as possible?
Develop each app in a separate Docker container and deploy using Elastic
Beanstalk
Your current log analysis application takes more than four hours to generate a report
of the top 10 users of your web application. You have been asked to implement a
system that can report this information in real time, ensure that the report is always
up to date, and handle increases in the number of requests to your web application.
Choose the option that is cost-effective and can fulfill the requirements.
...
You have a current Clouformation template defines in AWS. You need to change the
current alarm threshold defined in the Cloudwatch alarm. How can you achieve this?
Update the template and then update the stack with the new template. Only those
resources that need to be changed will be changed. All other resources which do not
need to be changed will remain as they are.
After reviewing the last quarter's monthly bills, management has noticed an increase
in the overall bill from Amazon. After researching this increase in cost, you
discovered that one of your new services is doing a lot of GET Bucket API calls to
Amazon S3 to build a metadata cache of all objects in the applications bucket. Your
boss has asked you to come up with a new cost-effective way to help reduce the
amount of these new GET Bucket API calls. What process should you use to help
mitigate the cost?
Using Amazon SNS, create a notification on any new Amazon S3 objects that
automatically updates a new DynamoDB table to store all metadata about the new
object. Subscribe the application to the Amazon SNS topic to update its internal
Amazon S3 object metadata cache from the DynamoDB table
You are using CloudFormation to launch an EC2 instance and then configure an
application after the instance is launched. You need the stack creation of the ELB
and Auto Scaling to wait until the EC2 instance is launched and configured properly.
How do you do this?
Use a CreationPolicy to wait for the creation of the other dependent resources
One of the instances in your Auto Scaling group health check returns the status of
Impaired to Auto Scaling. What will Auto Scaling do in this case.
Terminate the instance and launch a new instance
Your development team wants account-level access to production instances in order
to do live debugging of a highly secure environment. Which of the following should
you do?
Place each developer's own public key into a private S3 bucket, use instance profiles
and configuration management to create a user account for each developer on all
instances, and place the user's public keys into the appropriate account.
You have been tasked with deploying a scalable distributed system using AWS
OpsWorks. Your distributed system is required to scale on demand. As it is
distributed, each node must hold a configuration file that includes the hostnames of
the other instances within the layer. How should you configure AWS OpsWorks to
manage scaling this application dynamically?
Create a Chef Recipe to update this configuration file, configure your AWS
OpsWorks stack to use custom cookbooks, and assign this recipe to the Configure
LifeCycle Event of the specific layer
You have a large number of web servers in an Auto Scaling group behind a load
balancer. On an hourly basis, you want to filter and process the logs to collect data
on unique visitors, and then put that data in a durable data store in order to run
reports. Web servers in the Auto Scaling group are constantly launching and
terminating based on your scaling policies, but you do not want to lose any of the log
data from these servers during a stop/termination initiated by a user or by Auto
Scaling. What two approaches will meet these requirements? Choose two answers
from the options given below.
Install an Amazon Cloudwatch Logs Agent on every web server during the bootstrap
process.
Create a CloudWatch log group and define Metric Filters to create custom metrics
that track unique visitors from the streaming web server logs. Create a scheduled
task on an Amazon EC2 instance that runs every hour to generate a new report
based on the Cloudwatch custom metrics.

On the web servers, create a scheduled task that executes a script to rotate and
transmit the logs to an Amazon S3 bucket. Ensure that the operating system
shutdown procedure triggers a logs transmission when the Amazon EC2 instance is
stopped/terminated.
Use AWS Data Pipeline to move log data from the Amazon S3 bucket to Amazon
Redshift In order to process and run reports every hour.
You have a web application that's developed in Node.js The code is hosted in Git
repository. You want to now deploy this application to AWS. Which of the below 2
options can fulfil this requirement.
Create a Docker file to install Node.js. and gets the code from Git. Use the Dockerfile
to perform the deployment on a new AWS Elastic Beanstalk application.

Create an AWS CloudFormation template which creates an instance with the


AWS::EC2::Instance resource type and an AMI with Docker pre-installed. With
UserData, install Git to download the Node.js application and then set it up
Your company develops a variety of web applications using many platforms and
programming languages with different application dependencies. Each application
must be developed and deployed quickly and be highly available to satisfy your
business requirements. Which of the following methods should you use to deploy
these applications rapidly?
Develop the applications in Docker containers, and then deploy them to Elastic
Beanstalk environments with Auto Scaling and Elastic Load Balancing.
Your application uses CloudFormation to orchestrate your application's resources.
During your testing phase before the application went live, your Amazon RDS
instance type was changed and caused the instance to be re-created, resulting In
the loss of test data. How should you prevent this from occurring in the future?
Update the stack using ChangeSets
You have a set of EC2 instances hosted in AWS. You have created a role named
DemoRole and assigned that role to a policy, but you are unable to use that role with
an instance. Why is this the case
You need to create an instance profile and associate it with that specific role.
You are using Elastic Beanstalk to manage your application. You have a SQL script
that needs to only be executed once per deployment no matter how many EC2
instances you have running. How can you do this?
Use a "Container command" within an Elastic Beanstalk configuration file to execute
the script, ensuring that the "leader only" flag is set to true
As an architect you have decided to use CloudFormation instead of OpsWorks or
Elastic Beanstalk for deploying the applications in your company. Unfortunately, you
have discovered that there is a resource type that is not supported by
CloudFormation. What can you do to get around this.
Create a custom resource type using template developer, custom resource template,
and CloudFormation.
You work for an insurance company and are responsible for the day-to-day
operations of your company's online quote system used to provide insurance quotes
to members of the public. Your company wants to use the application logs generated
by the system to better understand customer behavior. Industry, regulations also
require that you retain all application logs for the system indefinitely in order to
investigate fraudulent claims in the future. You have been tasked
with designing a log management system with the following requirements:
- All log entries must be retained by the system, even during unplanned instance
failure.

- The customer insight team requires immediate access to the logs from the past
seven
days.
- The fraud investigation team requires access to all historic logs, but will wait up to
24 hours before these logs are available.

How would you meet these requirements in a cost-effective manner? Choose three
answers from the options below
Create an Amazon S3 lifecycle configuration to move log files from Amazon S3 to
Amazon Glacier after seven days

Configure your application to write logs to a separate Amazon EBS volume with the
"delete on termination" field set to false.
Create a script that moves the logs from the instance to Amazon S3 once an hour.

Create a housekeeping script that runs on a T2 micro instance managed by an Auto


Scaling group for high availability.
The script uses the AWS API to identify any unattached Amazon EBS volumes
containing log files.
Your housekeeping script will mount the Amazon EBS volume, upload all logs to
Amazon S3, and then delete the volume.
You've been tasked with improving the current deployment process by making it
easier to deploy and reducing the time it takes. You have been tasked with creating
a continuous integration (CI) pipeline that can build AMI's. Which of the below is the
best manner to get this done. Assume that at max your development team will be
deploying builds 5 times a week.
Have the CI system launch a new instance, then bootstrap the code and
dependencies on that instance, and create an AMI using the CreateImage API call.
You have deployed an Elastic Beanstalk application in a new environment and want
to save the current state of your environment in a document. You want to be able to
restore your environment to the current state later or possibly create a new
environment. You also want to make sure you have a restore point. How can you
achieve this?
Saved Configurations
You currently have an Auto Scaling group with an Elastic Load Balancer and need to
phase out all instances and replace with a new instance type. What are 2 ways in
which this can be achieved.
Use OldestLaunchConfiguration to phase out all instances that use the previous
configuration.

Attach an additional Auto Scaling configuration behind the ELB and phase in newer
instances while removing older instances
Your company has developed a web application and is hosting it in an Amazon S3
bucket configured for static website hosting. The application is using the AWS SDK
for JavaScript in the browser to access data stored in an Amazon DynamoDB table.
How can you ensure that API keys for access to your data in DynamoDB are kept
secure?
Configure a web identity federation role within IAM to enable access to the correct
DynamoDB resources and retrieve temporary credentials.
You are using a configuration management system to manage your Amazon EC2
instances. On your Amazon EC2 Instances, you want to store credentials for
connecting to an Amazon RDS MYSQL DB instance. How should you securely store
these credentials?
Assign an IAM role to your Amazon EC2 instance, and use this IAM role to access
the Amazon RDS DB from your Amazon EC2 instances.
You have been asked to de-risk deployments at your company. Specifically, the
CEO is concerned about outages that occur because of accidental inconsistencies
between Staging and Production, which sometimes cause unexpected behaviors in
Production even when Staging tests pass. You already use Docker to get high
consistency between Staging and Production for the application environment on your
EC2 instances. How do you further de-risk the rest of the execution environment,
since in AWS, there are many service components you may use beyond EC2 virtual
machines?
Develop models of your entire cloud system in CloudFormation. Use this model in
Staging and Production to achieve greater parity.
You need to create a Route53 record automatically in CloudFormation when not
running in production during all launches of a Template. How should you implement
this?
Use a Parameter for environment, and add a Condition on the Route53 Resource in
the template to create the record only when environment is not production.
You have a development team that is continuously spending a lot of time rolling back
updates for an application. They work on changes , and if the change fails , they
spend more than 5-6h in rolling back the update. Which of the below options can
help reduce the time for rolling back application versions.
Use Elastic Beanstalk and re-deploy using Application Versions
When thinking of AWS Elastic Beanstalk's model, which is true?
Applications have many environments, environments have many deployments.
You are hired as the new head of operations for a SaaS company. Your CTO has
asked you to make debugging any part of your entire operation simpler and as fast
as possible. She complains that she has no idea what is going on in the complex,
service-oriented architecture, because the developers just log to disk, and it's very
hard to find errors in logs on so many services. How can you best meet this
requirement and satisfy your CTO?
...
For AWS Auto Scaling, what is the first transition state an instance enters after
leaving steady state when scaling in due to health check failure or decreased load?
Terminating
You have an application running on an Amazon EC2 instance and you are using IAM
roles to securely access AWS Service APIs. How can you configure your application
running on that instance to retrieve the API keys for use with the AWS SDKs?
When using AWS SDKs and Amazon EC2 roles, you do not have to explicitly
retrieve API keys, because the SDK handles retrieving them from the Amazon EC2
MetaData service.
Which of these is not an instrinsic function in AWS CloudFormation?
Fn::Parse
...
DynamoDB table with roughly equal read and write throughput, with ElastiCache
caching.

Potrebbero piacerti anche