This section will contain ELB, CLI commands, EC2 and Lambda.
Links to other sections:
Elastic Load Balancers
– Instances monitored by ELB are reported as: InService or OutofService depending on the health check and the frequency of it
– Elastic Load Balancers are given DNS names, never IP addresses
describe-instances (pulls out in json format all available instances) – takes a long time.
describe-images (pulls out in json format all available images).
run-instances (create a new instance).
start-instances (only starts up stopped instances).
Region flag if a CLI command doesn’t work if region is not given.
To pass in bash script to an EC2 instance:
Configure instance details
The commands run in the background without intervention.
Chmod 400 to change permissions on the key pair and use it.
Resizable compute capacity, scale up/down quickly.
On demand payment. Fixed rate by the hour/second. Low cost, no upfront. Good for spiky workloads, test applications. Good for learning.
Reserved – contract. significant difference/discount in charge. Steady state or predictable usage. Make upfront payments and get more because of the discount. Scheduled RIs let people make use of requirements to be fulfilled say holiday seasons etc
Spot – bid for price, applications have flexible start and end times. If Amazon terminate the instance, prorata charge. If user terminates, full hour charged.
Dedicated hosts. EC2 physical host. Hardware bound licenses. Bring licenses for VMware instances. Useful for regulatory requirements, such as auditory/compliance requirements.
EC2 – T2 – Lowest cost, general purpose.
DrMcGiftPX in 2017
FIGHTDRMCPX in 2018
F – FPGA
I – IOPS
G – Graphics
H – High Disk Throughput
T – Cheap general purpse
D – Density
R – RAM
M – Main choice for general purpose apps
C – Compute
P – Pictures
X – Extreme Memory
Elastic Block Storage – block device, attached to VM. Replicated across availability zonees. Attached to EC2 instances.
GP2 SSD – General Purpose SSD. Upto 10,000 IOPS burst. Balance of price and performance.
Provisioned IOPS SSD – extreme IOPS. More than 10,000 IOPS. Upto 20,000/volume.
Throughout Optimized HDD (ST1). Cannot be a boot volume,only data volume. Big data, log processing. Data warehousing.
Cold HDD – infrqequently access workloads. File servers. not bootable.
Magentic – Cold HDD but bootable.
ONE EBS volume CANNOT be mounted to the same EC2 instance. EFS for shared volumes.
CloudWatch detailed monitoring. How the instance is performing.
Security Group are virtual firewalls. By default, everything can access because it says 0.0.0.0 (anywhere).
Publick key – same key on multiple EC2 instances.
Ec2-user is the default username.
Can be elevated to root.
yum install httpd – installs apache.
System Status – checks the underlying hardware.
Instance Status – checks the OS of the instance.
1 minute frequency for Detailed Monitoring checks.
Termination Protection is off by default.
Default action is to delete the root volume when the instance is terminated.
EBS root volumes of default AMIs cannot be encrypted.
Compute Service where code can be uploaded. AWS Lambda takes care of provisioning. Not worry about OS, patching, scaling etc.
Code runs in response to events.
Code runs in response to HTTP requests.
Lambda events can talk to Lambda and trigger other services.
Lambda functions must be < 5 mins
No servers (no admins of any sort).
Continuous scaling out automatically.
Runtime: C#, Go, Python, Java, Node.js