Domain 2: Design Resilient Architectures Flashcards
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.
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.
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
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
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
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
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
AWS X-Ray.
AWS X-Ray helps developers analyze and debug production distributed applications, such as those built using a microservices architecture.
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
Amazon Shield
This is the best answer. Reference: AWS Shield
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.
Network Load Balancer and DynamoDB.
This is the best answer in the scenario. Network Load Balancers support UDP and DynamoDB is a NoSQL database.
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
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.
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
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?
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
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.
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
CloudFormation
AWS CloudFormation lets you model, provision, and manage AWS and third-party resources by treating infrastructure as code.
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.
Enable Multi-AZ deployment on RDS. Failover will occur automatically.
This is the best solution in the scenario.
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
Use DynamoDB Autoscaling.
This is the best answer. Reference: Autoscaling
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
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
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
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
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/
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