M6: Compute Flashcards
Module 6
Four broad categories of compute services
VMs (IaaS)
Serverless
Container based
Platform as a service
EC2
Elastic: can increase / decrease
Compute: processing power and memory
Cloud
AMI
Template for root volume of instance
Launch permissions re which AWS accounts can use AMI
Block device mapping specifying the volumes to attach to instance
Creating a new AMI
Instance is stopped
Snapshot taken of root volume
Register snapshot as AMI
(Optionally copy AMI to other regions)
Launching EC2
- Select AMI
- Choose instance type
- Specify network location, deciding re public IP if in non default VPC
- Can attach IAM role to EC2 instance at this point or later
- Can pass user data to the instance
- Can config storage options
- Can assign tag
- Can specify one or more security groups, default used otherwise, can change after launch. Can add rules to security groups, all are evaluated.
- Key pair
Instance type
Varying combinations of CPU, memory, storage and networking capacity. Network bandwidth is also related to the size of the instance.
Running user data
Default: only first time instance starts up
Can write MIME multipart file user data script to run every time instance is booted
Amazon Elastic Block Store
Block storage designed for throughput and transaction intensive workloads
Instance store
Ephemeral block level storage, good for temporary content such as buffers
Elastic file system
Simple, scalable, fully managed NFS
Grows and shrinks automatically
Amazon S3
Object storage service
aws ec2 run-instances
image-id count instance-type key-name security-groups region
If no subnet id given, the default is chosen
Public IP address
Released when instance is stopped or terminated
Automatically assigned from pool if public IP chosen
Can go for elastic IP address instead
Elastic IP address
Allocate one in same region as instance
Max 5 per region
Associate with EC2 instance
Instance metadata URL
http://169.254.169.254/latest/meta-data/