Domain 2: Design Resilient Architectures Flashcards

1
Q

You currently host a file server on EC2 with the files being stored on EBS. After an outage lasting several hours, you need to design a fault-tolerant architecture so that if the EC2 instance goes down, your customers will still be able to access their files. What is the most fault-tolerant architecture below?

Lambda Function behind API Gateway with three EBS volumes mounted to the function.

Two EC2 instances behind an application load balancer and autoscaling group connected to two EBS volumes in separate regions.

An EC2 instance behind a classic load balancer connected to an EBS volume in another region.

Three EC2 instances behind an Application Load Balancer and Autoscaling group, connected to an EFS mount.

A

Two EC2 instances behind an application load balancer and autoscaling group connected to two EBS volumes in separate regions.

This is not technically possible. You cannot have EBS in separate regions.

Selected

Three EC2 instances behind an Application Load Balancer and Autoscaling group, connected to an EFS mount.

This is the most fault-tolerant solution in the scenario.

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

A software company has created an application to capture service requests from users and also enhancement requests. The application is deployed on an Auto Scaling Group of EC2 instances fronted by an Application Load Balancer. The Auto Scaling Group has scaled to maximum capacity, but there are still requests being lost. The company has decided to use SQS with the Auto Scaling Group to ensure all messages are saved and processed. What is an appropriate metric for Auto Scaling with SQS?

Backlog per user

CPU utilization

Backlog per instance

Backlog per hour

A

Backlog per instance

The issue with using a CloudWatch Amazon SQS metric like ApproximateNumberOfMessagesVisible for target tracking is that the number of messages in the queue might not change proportionally to the size of the Auto Scaling Group that processes messages from the queue. That’s because the number of messages in your SQS queue does not solely define the number of instances needed. The number of instances in your Auto Scaling Group can be driven by multiple factors, including how long it takes to process a message and the acceptable amount of latency (queue delay). The solution is to use a backlog per instance metric with the target value being the acceptable backlog per instance to maintain. You can calculate these numbers as follows: Backlog per instance: To calculate your backlog per instance, start with the ApproximateNumberOfMessages queue attribute to determine the length of the SQS queue (number of messages available for retrieval from the queue). Divide that number by the fleet’s running capacity, which for an Auto Scaling Group is the number of instances in the InService state, to get the backlog per instance. Reference: Scaling Based on Amazon SQS

Backlog per hour

The focus is on the current state of the queue and the instances, not on how the backlog accumulates over a specific time frame like an hour. From a broader AWS perspective, while time-based metrics can be useful in certain scenarios, especially when analyzing trends, they might not be as effective for real-time scaling decisions as the immediate backlog per instance.

Selected

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

You lead a small development team for an LLC. The team is beginning to plan development of a full stack web application leveraging Next.js with SSR on the frontend, and they are wanting to leverage the AWS cloud for it. Unfortunately, nobody on the team is well-versed in AWS services and best practices, so they want to avoid complex infrastructure designs. Which AWS service could the development team use to simplify development and deployment of their full stack application?

AWS AppSync

Amazon EKS with DynamoDB

AWS Lambda with Amazon RDS

AWS Amplify

A

AWS AppSync

AWS AppSync is a service that offers a managed GraphQL interface for real-time data calls.

Selected

AWS Amplify

AWS Amplify offers developers a set of tools for easily deploying full stack applications to AWS. It offers Git-based workflows with automated deployments for web applications, and it is especially suited for developers not as familiar with AWS who need to also leverage server-side rendering. Reference: Welcome to AWS Amplify Hosting Deploy server-side rendered apps with Amplify Hosting

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

You host a serverless website on AWS using API Gateway, Lambda, and DynamoDB. It’s highly resilient. However, recently, database updates seem to be getting lost between the client and the end DynamoDB table. You need to trace what is happening. What AWS service should you use to troubleshoot this issue?

AWS Track and Trace.

CloudTrail

AWS X-Ray.

CloudWatch

A

AWS X-Ray.

AWS X-Ray helps developers analyze and debug production distributed applications, such as those built using a microservices architecture.

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

You have a large online store that specializes in 4th of July products. 4th of July is fast approaching and your website goes down. You host the website on premise. After investigation, you discover that this is a DDoS attack. Your manager wants to know, if you move your website to AWS, which service can be used to help prevent DDOS attacks?

Amazon Defender

Amazon Avenger

Amazon DDOS Defender

Amazon Shield

A

Amazon Shield

This is the best answer. Reference: AWS Shield

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

You work for a major gaming company based out of Norway. The company needs to distribute gaming traffic across multiple servers using UDP and store this information in a NoSQL database. What solution should you use?

Network Load Balancer with Amazon Aurora Serverless.

Application Load Balancer with Amazon Aurora.

Application Load Balancer with Microsoft SQL Server in RDS.

Network Load Balancer and DynamoDB.

A

Network Load Balancer and DynamoDB.

This is the best answer in the scenario. Network Load Balancers support UDP and DynamoDB is a NoSQL database.

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

You work for a real estate company that has a bunch of different batch processes they need to automate, such as patch management and data synchronization. You need to automate this and integrate it with AWS services and you need to do this serverless if possible. What AWS service should you use?

AWS Step-Functions

AWS X-Ray

AWS Batch Manager

AWS Batch Assist

A

AWS Step-Functions

AWS Step Functions is a low-code, visual workflow service that developers use to build distributed applications, automate IT and business processes, and build data and machine learning pipelines using AWS services.

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

Your company develops a specialized web application that has recently been converted to a mobile application on both iOS and Android devices. Currently, the QA team is testing on their personal devices. You want to offload the device testing from the team’s personal devices and instead leverage AWS for automated testing. Which AWS service can provide real, physical tablets and phones for automated testing of mobile applications?

AWS Device Farm

AWS AppSync

AWS Lambda Mobile

AWS Amplify

A

AWS Device Farm

AWS Device Farm offers real mobile devices, hosted in and by AWS, to be used for testing of mobile applications and web applications. You can perform automated tests via scripts on the devices, or you can even perform remote testing that allows you to use gestures and swipes on the mobile device. Reference: What is AWS Device Farm?

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

You have a website that uses MongoDB, a NoSQL database, on its backend. It requires high, sequential read and write access to very large data sets on local storage. You need to migrate this database to AWS and host it on EC2 with Amazon EBS. What EC2 instance type would be best suited to handle I/O-intensive database workloads and sequential writes?

Use storage optimized instances with general purpose SSD volumes

Use storage optimized instances with provisioned IOPS SSD volumes

Use memory optimized instances with provisioned IOPS SSD volumes

Use compute optimized instances with general purpose SSD volumes

A

Use storage optimized instances with provisioned IOPS SSD volumes

Storage optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. Provisioned IOPS SSD volumes are recommended for I/O-intensive database workloads that require sustained IOPS performance. AWS Documentation: Amazon EBS volume types.

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

You have a solution that is hosted in US-West-1 consisting of a custom VPC, 20 EC2 instances, RDS instances, an application load balancer and an AutoScaling Group. Unfortunately, the entire region goes down for a few hours and your business suffers a large loss of revenue. Your manager decides he wants scripted infrastructure so that, if a region goes down, you will be able to run a script in another region and create a copy of your environment, including all the custom VPC configurations. What AWS service should you use?

Lambda

Amazon Cloud Backup Provisioning Service (ACBPS)

AWS Elastic Beanstalk

CloudFormation

A

CloudFormation

AWS CloudFormation lets you model, provision, and manage AWS and third-party resources by treating infrastructure as code.

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

You are a solutions architect working for a popular online store. The store exists on a single EC2 instance with an RDS instance on the backend. The RDS instance experiences an outage and your website goes down. Your boss asks you how you can make the site more resilient. What should you recommend?

Create another RDS instance in another Availability Zone. Update your connection string on your website to connect to both RDS instances simultaneously.

Add a read replica to the RDS instance and design a script to failover to this instance if the primary instance goes down.

Enable Multi-AZ deployment on RDS. Failover will occur automatically.

Migrate your RDS instance to DynamoDB and turn on Multi-AZ.

A

Enable Multi-AZ deployment on RDS. Failover will occur automatically.

This is the best solution in the scenario.

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

You have a social media website that uses a DynamoDB table on the backend. Your monitoring detects that the DynamoDB table begins to throttle requests during high peak loads, which causes the slow performance of the website. How can you remedy this?

Put the DynamoDB table behind an autoscaling group.

Use DynamoDB Autoscaling.

Create an Aurora read replica and spread the load between DynamoDB and Aurora.

Migrate the database to RDS MySQL and turn on Multi-AZ

A

Use DynamoDB Autoscaling.

This is the best answer. Reference: Autoscaling

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

You currently host a website on-premises that uses RabbitMQ, but you are now migrating to AWS. You need something that is resilient, can act as an alternative asynchronous service, and also supports the MQTT messaging protocol. What service should you use?

Amazon MQ

Amazon Message Rabbit

Amazon SWF

Amazon SNS

A

Amazon MQ

Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ that makes it easy to set up and operate message brokers on AWS. Reference: Amazon MQ

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

Your company is migrating their data to AWS, and included in this is a CSV file of your customers. The file is quite large, around 3 GB and has been uploaded to an S3 bucket. Due to the primary database going offline during the migration, your manager has asked you to query this CSV file to find information about a specific customer. What AWS service should you use to achieve this?

S3 Simple Query Service (SQS)

DynamoDB S3 Connect.

CloudWatch S3 Query Service.

Amazon Athena

A

Amazon Athena

Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run. Reference: Amazon Athena

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

You have taken over management of several instances in the company AWS environment. You want to quickly retrieve data about the instances such as instance ID, public keys, and public IP address. A URL command can be used to do this. What can you append to the URL http://169.254.169.254/latest/ to retrieve this data?

user-data/

instance-data/

instance-demographic-data/

meta-data/

A

meta-data/

Instance metadata is data about your instance that you can use to configure or manage the running instance. Instance metadata is divided into categories, for example, host name, events, and security groups. Because your instance metadata is available from your running instance, you do not need to use the Amazon EC2 console or the AWS CLI. This can be helpful when you’re writing scripts to run from your instance. For example, you can access the local IP address of your instance from instance metadata to manage a connection to an external application. Instance metadata is divided into categories. For a description of each instance metadata category, see Instance metadata categories. To view all categories of instance metadata from within a running instance, use the following URI. http://169.254.169.254/latest/meta-data/

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

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

You have a fleet of EC2 instances behind an Auto Scaling Group. Your website is becoming sluggish, so you SSH into your instances and notice that your RAM utilization is at 99% for each instance. This should be triggering an Auto Scaling event, but it is not. What should you do to fix the situation?

Install and configure Amazon Inspector on your EC2 instance. This will trigger an Auto Scaling event when RAM utilization reaches 87%.

Install a CloudTrail agent on each EC2 instance and configure the agent for RAM monitoring. This will trigger an Auto Scaling event.

Install a CloudWatch agent on your EC2 instances that will trigger an Auto Scaling event.

Migrate the website to S3 and configure CloudFormation to detect any over utilization within your S3 buckets.

A

Install a CloudWatch agent on your EC2 instances that will trigger an Auto Scaling event.

Installing the CloudWatch agent on the EC2 instances will enable you to capture RAM utilization and trigger an Auto Scaling event.

17
Q

A small startup company has begun using AWS for all of its IT infrastructure. The company has two AWS Solutions Architects, and they are very proficient with AWS deployments. They want to choose a deployment service that best meets the given requirements. Those requirements include version control of their infrastructure documentation and granular control of all of the services to be deployed. Which AWS service would best meet these requirements?

OpsWorks

Elastic Beanstalk

Terraform

CloudFormation

A

CloudFormation

Correct. CloudFormation is infrastructure as code, and the CloudFormation feature of templates allows this infrastructure as code to be version controlled. While it can be argued that both OpsWorks and Elastic Beanstalk provide some granular control of services, this is not the main feature of either. Both OpsWorks and Elastic Beanstalk, to varying degrees, allow some detailed configuration. How is AWS CloudFormation different from AWS Elastic Beanstalk? These services are designed to complement each other. AWS Elastic Beanstalk provides an environment to deploy and run applications in the cloud. It is integrated with developer tools and provides a one-stop experience for you to manage the lifecycle of your applications. AWS CloudFormation is a convenient provisioning mechanism for a broad range of AWS and third-party resources. It supports the infrastructure needs of many different types of applications, such as existing enterprise applications, legacy applications, applications built using a variety of AWS resources, and container-based solutions (including those built using AWS Elastic Beanstalk). AWS CloudFormation supports Elastic Beanstalk application environments as one of the AWS resource types. This allows you, for example, to create and manage an AWS Elastic Beanstalk–hosted application along with an RDS database to store the application data. In addition to RDS instances, any other supported AWS resource can be added to the group as well.

https://aws.amazon.com/cloudformation/faqs/