Amazon Elastic Cloud Computer (EC2) Flashcards
EC2
Elastic Cloud Computing.
- Service on AWS that allows us to provision re-sizable computing environments.
- Referred to as an instance.
Instance
An EC2 re-sizeable computing environment.
When creating an instance, what can you customize (3)
Hardware, OS, software running on instance.
Where is an EC2 provisioned?
On a host machine within a given availability zone.
There can be multiple isolated guest environment on an EC2. (True or falese?)
True
Bare Metal Access
An option in EC2.
1. Computing application (or any applications running on it) have direct access to CPU and memory resources on the server.
Creating an EC2 instance. What are the variables user can select? (6)
- Type
- Size
- Number of Virtual CPUS (vCPUs)
- Amount of RAM
- Configured with specific level of network throughput.
- Can be configured with high graphics cards / high performance disks (optional)
Types of EC2 instances. (5)
- General Purpose - balanced mix of CPU, RAM, other resources.
- Compute Optimized - Relatively high amount of CPU
- Memory Optimized - Relatively high amount of RAM
- Storage Optimized - Relatively high amount of storage and throughput
- Accelerated Computing - Dedicated graphics processing units (GPU) or Field programmable gate array resources
How to choose an EC2 instance?
Select size based on current workload.
How do you resize a current EC2 instance?
- Stop instance.
- Modify instance type attribute
- start instance.
EBS
Amazon Block Store.
- Similar to a hard drive in that block storage volumes offer read/write access at a block level.
- Can be attached to a specific instance
- Ideal for installing OS, apps, persistent data
- Can be encrypted
- Decoupled from physical host machine
2 Types of EC2 storage
Persistent and Temporary
Persistence Block Storage
One type of EC2 storage.
1. Configure during
Decoupled
- EBS can detach and reattache to a different host machine in the same availability zone.
EBS optimized instance
- Reserves dedicated network bandwidth for EBS volume traffic
EBS snapshot.
- The data associated with the snapshot is replicated across multiple availabilty zones automatically
Temporary storage.
- mounts instance locally on physical host running the instance
- Good for high performance storage.
- Caching, temporary files
- Can use in any case where application is already replicating data
- Since it’s physically attached to host, read/write is relatively high
- Data persists only while instance runs on host (and across reboots), but data is deleted when instance is stopped or terminated
AMI
Amazon Machine Image
- Template for OS and applications on root volume of Instance.
- Can allocate additional volumns.
- Several different time of AMIs.
VPC
Virtual Private Cloud
Elastic Network Interfaces
- Linked to a software-defined network on Amazon VPC.
- Each instance is assigned a primary network interface linked to a subnet within an Amazon VPC
- Default is a subnet within Amazon VPC.
Private vs. Public IP in VPC.
- Private for communicating within VPC.
2. Public for communicating over the internet.
VPC Security Group
- Used to protect incoming/outcoming traffic (like a firewall)
- Security rules must allow for a connection for it to be successful.
- Can attach additional network interfaces (with their own IP addresses).
- The sheer number of network interfaces has no effect on throughput of an instance.
Network throughput and bandwidth on VPC depends on what 2 things?
- Instance Type
2. Instance Size
Linux-based OS provides access via what? (EC2 instance)
Secure Shell (SSH)
Windows-based sign-in default is what? (EC2 instance)
Remote Desktop Protocol.
Default user Linux EC2 instance
ec2-user
Default user Linux Ubuntu EC2 instance
Ubuntu
Default user Windows EC2 instance
administrator
Named EC2 key pairs components.
Public (AWS stores) and Private (user must keep safe)
EC2 instance lifecycle, what are the primary states?
Running, stopped, terminated
EC2 instance lifecycle, what are the intermediary states?
pending, shutting down, stopping
When are EC2 costs charged?
While running. There can be charges associated in a stopped state for data storage though.
IMDS
Instance Metadata Service.
1. Enables code running on an EC2 instance to discover properties about the instane
IMDS IP address
Instance Metadata Service has a special IP address: 169.254.169.254
- This can be queried using HTTP to get metadata information
- Including: instance itself, credentials resulting from IAM role, retreive user data during launch to boot strap information
VPC
Virtual Private Cloud.
- Comprises logically isolated networks within an AWS account, networks or software defined can span all availabilty zones within a particular AWS region.
- We maintain complete control over VPC connectivity