EC2 Flashcards
What are the 3 main states of EC2 instances?
Running
Stopped
Terminated
What is true of instance store volumes?
They are temporary (ephemeral) storage
Data stored on them can be lost when an EC2 instance stops and starts
Data stored on them can be lost if a hardware failure occurs
If the AZ which an EC2 instance is running in fails, what happens to the instance?
The instance will remain failed until at least when the AZ recovers.
Can an EC2 instance be migrated between AZ’s?
No - but an AMI can be created from an instance and used to provision a clone in another AZ
What kind of use-case suits using IO1 EBS volumes?
When maximum consistent IOPS is a priority and data is important.
How many instances can a GP2 volume be attached to at the same time?
1
Can EBS volumes be attached to instances in any AZ?
No, only instances in the same AZ as the volume.
When should instance store volumes be used?
For replaceable data
For temporary data
For max IO
If you have a short term workload which needs the cheapest EC2 pricing but can’t tolerate interruption which billing model should you pick?
On-Demand
You need to deploy multiple EC2 Linux instances that will provide your company with virtual private networks (VPN’s) using software called OpenVPN. What would be the most efficient two solutions?
- Select a regular Linux AMI and bootstrap it using user data that will install and configure the OpenVPN package on the instance and use it for your VPN instances.
- Search the AWS Marketplace to see whether there is an official AMI provided and supported by the OpenVPN company.
As part of your company’s long-term cloud migration strategy, you have VMWare virtual machine in your local infrastructure that you’d like to copy to your AWS account and run as an EC2 instance. What will be the two necessary steps?
1.Import the virtual machine using VM Import/Export
2. Select the imported VM from among your private AMI’s and launch an instance.
Your AWS CLI command to launch an AMI as an EC2 instance has failed, giving you an error message that includes “InvalidAMIID.NotFound”. What is the most likely cause?
The AMI you specified exists in a different region than the one you have currently specified.
The sensitivity of the data your company works with means that the instances you run must be secured through complete physical isolation. What should you specify as you configure the new instance?
Dedicated Host Tenancy
Normally, two instances running m5.large instance types can handle the traffic accessing your online e-commerce site, but you know that you will face short, unpredictable periods of high demand. What two things should you implement?
- Configure Autoscaling
- Purchase two m5.large reserve instances and as many on-demand instances as necessary.
In the course of a routine infrastructure audit, your organization discovers that some of your running EC2 instances are not configured properly and must be updated. What configuration detail cannot be changed on an existing EC2 instance?
AMI
What EBS options will you need to keep your data-hungry application that requires up to 20,000 IOPS happy?
Provisioned-IOPS SSD
You need to restrict access to your EC2 instance-based application to only certain clients and only certain targets. What three attributes of an incoming data packet are used by a security group to determine whether it should be allowed through?
- Network port
- Source address
- Network protocol
How are IAM roles commonly used to ensure secure resource access in relation to EC2 instances?
A role can give users and resources permission to access the EC2 instance.
IAM roles define how resources access other resources.
You have an instance running within a private subnet that needs external network access to receive software updates and patches. What two products can securely provide that access from a public subnet within the same VPC?
- NAT Instance
- NAT Gateway
NAT Instances and NAT Gateways are AWS tools for safely routing traffic between private and public subnets and from there, out to the Internet.
What do you have to do to securely authenticate to the GUI console of a Windows EC2 session?
Use the private key of your key pair to retrieve the password you will use to log in.
The client computer in an encrypted operation must always use the private key to authenticate. For EC2 instances running Windows, you retirieve the password you will use for the GUI login using your private key.
Your application deployment includes multiple EC2 instances that need low-latency connections to each other. What AWS tool will allow you to locate EC2 instances closer to each other to reduce network latency.
Placement Groups
Placement groups allow you to specify where your EC2 instances will live.
To save configuration time and money, you want your application to run only when network events trigger it but shut down immediately after. What AWS tool will do that for you?
AWS Lambda
Lambda can be used as such a trigger.
What AWS service launches and manages infrastructure for your application that will remain running until you manually stop it?
AWS Elastic Beanstalk
What service will allow you to quickly copy a virtual machine image from your local infrastructure to your AWS VPC?
VM Import/Export
What service is a physical high-capacity storage device that Amazon ships to your office for you to load data and ship back?
AWS Snowball
What service uses Amazon partner providers to build a high-speed connection between your servers and your AWS VPC?
AWS Direct Connect
You have configured an EC2 Auto Scaling group to use a launch configuration to provision and install an application on several instances. You now need to reconfigure Auto Scaling to install an additional application on new instances. What should you do next?
Create a launch template and configure the Auto Scaling group to use it.
You create an Auto Scaling group with a minimum group size of 3, a maximum group size of 10, and a desired capacity of 5. You then manually terminate two instances in the group. What will Auto Scaling do next?
Create 2 new instances
Auto scaling strives to maintain the number of instances specified in the desired capacity setting. If the desired capacity setting isn’t set, Auto Scaling will attempt to maintain the number of instances specified by the minimum group size. Given a desired capacity value of 5, the should be 5 healthy instances. If you manually terminate 2 of them, Auto Scaling will create two new ones to replace them. Auto Scaling will not adjust the desired capacity or minimum group size.
You’re running an application that receives a spike in traffic on the first day of every month. You want to configure Auto Scaling to add more instances before the spike begins and then add additional instances in proportion to the CPU utilization of each instance. What should you implement?
- Scheduled Actions
- Step Scaling Policies
Scheduled actions can adjust the minimum and maximum group sizes and the desired capacity on a schedule, which is useful when your application has a predictable load pattern. To add more instances in proportion to aggregate CPU utilization of thr group, implement step scaling policies.
As part of your new data backup protocols, you need to manually take EBS snapshots of several hundred volumes. Which type of Systems Manager document enables you to do this?
Automation
Automation documents let you perform actions against your AWS resources, including taking EBS snapshots. Although called automation documents, you can still manually execute them.
You want to launch and manage a complex microservices container workload in AWS but you want to avoid as many configuration headaches as possible. You figure you will be fine with whatever defaults you’re offered. What platform is your best choice?
AWS Fargate
Fargate is a service that uses either ECS or EKS infrastructure under the hood, but actually abstracts away most of the configuration details.
Which EC2 purchasing option can provide you with the biggest discount, but is not suitable for critical jobs or databases?
Spot Instances
What should you use to control traffic in and out of EC2 instances?
Security Groups
How long can you reserve an EC2 Reserved Instance?
1 or 3 years
Which type of EC2 instances are great for compute-intensive workloads requiring high performance processors (batch processing, media transcoding, high-performance computing, scientific modeling & machine learning, and dedicated gaming servers)?
Compute Optimized
Which EC2 purchasing option are good for long workloads?
Reserved Instances
Which EC2 purchasing option should you use for an application you plan to run on a server continuously for 1 year?
Reserved Instances
You are preparing to launch an application that will be hosted on a set of EC2 instances. This application needs some software installation and some OS packages need to be updated during the first launch. What is the best way to achieve this when you launch the EC2 instances?
Write a bash script that installs the required software and updates to you OS, then use this script in EC2 User Data when you launch your EC2 instances.
Which EC2 Instance Type should you choose for a critical application that uses an in-memory database?
Memory Optimized
Which EC2 Instance Type are great for workloads requiring large data sets in memory?
Memory Optimized
Which EC2 Instance Type are great for workloads requiring high, sequential read/write access to large data sets on local storage?
Storage Optimized
You have an e-commerce application with an OLTP database hosted on-premises. This application has popularity which results in its database has thousands of requests per second. You want to migrate the database to an EC2 instance. Which EC2 Instance Type should you choose to handle this high-frequency OLTP database?
Storage Optimized
What type of EC2 Purchasing Option are good for companies with strong compliance needs or for software that have complicated licensing models?
Dedicated Hosts
You’re planning to migrate on-premises applications to AWS. Your company has strict compliance requirements that require your applications to run on dedicated servers. You also need to use your own server-bound software license to reduce costs. Which EC2 Purchasing Option is suitable for you?
Dedicated Hosts
You would like to deploy a database technology on an EC2 instance and the vendor license bills you based on the physical cores and underlying network socket visibility. Which EC2 Purchasing Option allows you to get visibility into them?
Dedicated Hosts
___________ is a set of Spot Instances and optionally On-demand Instances.
Spot Fleet
___________ is a public IPv4 that you own as long as you want and you can attach it to one EC2 instance at a time?
Elastic IP
You have launched an EC2 instance that will host a NodeJS application. After installing all the required software and configured you application, you noted down the EC2 instance public IPv4 so you can access it. Then, you stopped and then started your EC2 instance to complete the application configuration. After restart, you can’t access the EC2 instance, and you found that the EC2 instance public IPv4 has been changed. What should you do to assign a fixed public IPv4 to your EC2 instance?
Allocate an Elastic IP and assign it to your EC2 instance.
Which EC2 Placement Groups place your EC2 instances next to each other which gives you high-performance computing and networking?
Cluster Placement Group
You have an application performing big data analysis hosted on a fleet of EC2 instances. You want to ensure your EC2 instances have the highest networking performance while communicating with each other. Which EC2 Placement Group should you choose?
Cluster Placement Group
Which EC2 Placement Group places your EC2 instances on different physical hardware across different AZ’s?
Spread Placement Group
You have a critical application hosted on a fleet of EC2 instances in which you want to achieve maximum availability when there’s an AZ failure. Which EC2 Placement Group should you choose?
Spread Placement Group
To enable EC2 Hibernate, the EC2 Instance Root Volume type must be an _________ and must be encrypted to ensure the protection of sensitive content.
EBS Volume