Elastic Compute Cloud (EC2) Flashcards
What is an On-Demand instance?
Pay by the hour or the second, depending on the type of instance you run. Great for flexibility.
What is a Spot instance?
Purchased unused capacity at a discount of up to 90%. Prices fluctuate with supply and demand. Great for applications with flexible start and end times.
What is a Reserved instance?
Reserve capacity for 1 or 3 years. Up to 72% discount on the hourly charge. Great if you have known or fixed requirements.
What is a Dedicated instance?
A physical EC2 server dedicated for your use. Great if you have server-bound licences to reuse or compliance requirements.
How can you give access to someone without access key ID and secret access key?
use roles.
How do you define permissions for a role?
via policies.
Can you update a policy already attached to a role?
Yes. it will take immediate effect.
Can you attach a role to a running EC2 instance?
Yes, you can attach/detach roles to running instances without having to stop or terminate them.
When do changes to security groups take effect?
Immediately.
How many instances can you have in a security group?
Any number.
Can you have multiple security groups attached to an EC2 instance?
Yes.
What is a security group?
A virtual firewall for your EC2 instance. It controls what traffic can reach your EC2 instance. You add rules to allows SSH or HTTP for example. By default everything is blocked.
What is a Bootstrap Script?
A script that runs when the EC2 instance boots. It has root permissions.
What are the default inbound/outbound traffic rules for security groups
- All inbound traffic is blocked by default.
- All outbound traffic is allowed.
What is User Data and Metadata?
- User data is simply bootstrap scripts.
- Metadata is data about your EC2 instances.
- You can use bootstrap scripts (user data) to access metadata.