Elastic Compute Cloud (EC2) Flashcards
What is an EC2 instance?
A virtual server hosted in an AWS data center, that is managed by you.
What are the EC2 pricing options?
- On-Demand
- Reserved
- Spot
- Dedicated
Explain EC2 Reserved pricing option.
It is reserved capacity for 1 to 3 years, with up to a 72% discount on the hourly charge.
Explain the EC2 Spot Instance pricing option.
You purchase unused capacity at a discount up to 90% and prices fluctuate based on supply and demand.
What are good use cases for the EC2 On-Demand pricing option?
Applications with short-term, spiky, or unpredictable workloads that cannot be interrupted.
What are good use cases for the EC2 Reserved pricing option?
When you have predictable usage with specific capacity requirements and where you can make upfront payments. You can save up to 72% off the standard EC2 On-Demand option.
What are Convertible Reserved Instances (RI) in EC2?
You have the option to change to a different RI type of equal or greater value with up to 54% off the On-Demand price.
What are the three types of EC2 Reserved Instance types?
- Standard Reserved
- Convertible Reserved
- Scheduled Reserved
What are Scheduled Reserved Instances (RI) in EC2?
You may launch them within the time window you define of a predictable recurring schedule.
Is a Reserved Instance cross-region?
No, it is regional-specific.
When should you use spot instances in EC2?
For applications that have flexible start and end times, or applications that are only feasible as really low compute prices, or applications that need an urgent amount of additional computing capacity.
When should you use dedicated hosts in EC2?
- When you have regulatory compliance requirements that do not support multi-tenant virtualization
- Great for licensing that doesn’t support multi-tenant or cloud deployments (e.g. Microsoft, Oracle)
What are best practices for user access using the AWS CLI?
- Always give your users the minimum amount of access required to do their job
- Create groups and assign users to groups.
What is a AWS secret access key?
Effectively the password for using the AWS CLI, where you will only get to see it once. If you lose it, you’ll need to delete it and recreate a new one.
What operating systems are supported by the AWS CLI?
- Windows
- Mac
- Unix
What is an IAM role?
An identity you can create in IAM that has specific permissions, however is intended to be assumable by anyone who needs it.
When you assume a role, it provides you with temporary security credentials for your role session.
Who or what can assume a role?
- People
- AWS architecture
- System-level accounts
Are roles account-specific?
No, they can allow the ability to interact with resources in other AWS accounts.
What is the preferred option from a security perspective in IAM, users, groups or roles?
Roles (to avoid hard-coding credentials)
If you change a policy document within a role, must you create a new role session to gain that new privilege?
No, it takes effect immediately.
If you attach a role to a running EC2 instance, must you restart the instance to gain that new privilege?
No, it takes effect immediately without requiring a restart.
What are security groups in EC2?
They are virtual firewalls for your EC2 instance.
By default, what ports are open on an EC2 instance?
By default, everything is blocked. You must create security groups to make ports accessible.
What is the IP address range to allow all access to an EC2 instance?
0.0.0.0/0
What is a bootstrap script in EC2?
A script that is run when the instance first runs, which allows you to automate the installation of applications.
It is referred to as user data.
If you change a security group’s permissions in EC2, must you restart the EC2 instance for it to take effect?
No, it takes effect immediately.
Is there a limit to the number of EC2 instances allowed in a security group?
No, there is no limit.
How many security groups can be attached to a single EC2 instance?
Multiple security groups are allowed.