EC2 Flashcards
An EC2 Instance in stopped state will still be charged for ??
- Storage
- Network(free, except for EiP)
An EC2 Instance in
Running state is charged for??
- memory
- storage
- Network
- CPU
Install Stress utility
$sudo yum install stress -y
To run
$ stress -c 1 -t 3600
Options
-t [timeout]
-c [CPUs]
CHMOD 400
For restricting access to our .pem file to master user Only. Before $ chmod 400 xyz.pem file is available to all users in the local Host
Block Storage Structure
Block storage has no in-built structure,it’s just a Collection of Uniquely Addressable blocks. Its up to the OS to create a file system
EC2 Family
- Compute Optimized
- Memory Optimized
- Storage Optimized
- General Purpose
- Accelerated Computing
EC2 Instane Type
EBS
Whenever a block storage is attached to an EC2, ec2 creates a FileSystem on it, such as ext3, ext4,NTFS or XFS
EBS Life Expectancy
EBS volumes are detached and Persistent. They are resilient to an AZ. LifeCycle is not Linked to any Instance.
Can be Backed up into S3 as a Snapshot. Now Making EBS a regional storage.
GP2 Use Case
- Boot volumes,
- low-latency interactive apps,
- dev & test
GP3 Use Case
Way fastre (3000 IOPS-16,000)IOPS
- Virtual desktops,
- medium sized single instance databases such as MSSQL Server and Oracle DB,
- low-latency interactive apps,
- dev & test,
- boot volumes
io1,io2
- With io1/2/BlockExpress OPS can be adjusted Independently of size..
- io1 5010PS/GB (MAX)
- io2 50010PS/GB (MAX)
- BlockExpress 100010PS/GB (MAX)
- 4 GB-16 TB i01/2
- 4 GB-64 TB BlockExpress
EC2 Lifecycle
STOP
- Host is changed,
- Public ipv4 address will change to that of a new host.
- Instance Store is lost
Instance RESTART
- Host and Instance store persist
EBS Encryption on storage vs on memory
When an EBS is encrypted, the data stored on the EBS is the cyphertext version, only the MAIN memory sees the Plain-Text
DEK and Snapshots Lifecycle
When KMS encryption is enabled on an EBS, a new DEK is issued, and that DEK is linked to the lifespan of the Volume and all its descendants (subsequent snapshots and its copies). Encryption cannot be removed.
Encryption transfer over new volumes
Every new volume uses a new unique encryption key
Ec2 instance dns
EC2 instance dns (eg ec2-10-16-121-83.compute1.amazon.com) resolves to the ip address on the ENI of the ec2 instance. So does the Public ipv4 address.
Ec2 encryption level
Ec2 encryption happens at the host level. This is usually between the Host and the EBS. The ec2 so is just granted the decryption keys (DEK) in other to see the plaintext.
ENI and private ipv4 behavior during shutdown or termination.
The private ip address of an instance is actually attached to the ENI of the instance. Once the instance is shutdown or Terminated, that ENI is moved to a new host(out of our scope). Launching a new instance would mean collecting a new ENI which is linked to a subnet and a particular Vgc, hence, a new private ipv4
Licensing
Licensing is usually done on a MAC Address. And the MAC address is usually embedded on the ENI. Therefore, for secondary ENIs(which can always be moved between instances), the License can be moved from one instance to the other.