This was my preparation note while I appeared for AWS solution architect – Associate exam. I cleared it in first attempt with good margin. Sharing it here as I guess it helps for beginners and aspirants.
Other notes in this series.
Elastic Compute Cloud (EC2)
Pricing option
- On demand – Pay for the number of hrs.
- Reserved – Reserve the instance for 2/3 years.
- Better pricing option.
- You would have to pay upfront.
- Possible to transfer a reserved instance from one availability zone to another within a region.
- Spot – More like stock market. 50 – 94% of usual price.
- Depends on the supply and demand.
- Need to time it.
- Spot price for fixed duration bidding also available.
Details
- Roles can be attached to EC2 instance only when it is created.
- EC2 terminal protection prevents users from accidentally deleting the instance through tools or APIs.
- Root EBS volume of EC2 cannot be encrypted.
- While creating an instance, we could attach bash scripts to execute the custom code.
- EC2 meta data can be fetched from a URL HTTP://169.254.169.254/latest/meta-data
- Metadata could include IP address,network profile, mac address, etc.
- EC2 instance types
- https://aws.amazon.com/ec2/instance-types/
EC2 placement group
- Provides high network capabilities (low latency, high network throughput) within an availability zone.
- Useful for grid computing systems.
- Only certain types of instances can be launched in placement groups, example compute, GPU, mem, storage optimized.
- AWS recommends same family and instance type within a placement group.
EC2 Ephemeral storage
- Aka Instance storage.
- Non-persistence across reboots.
- Cannot be detached or attached.
- Suitable for temporary storage such as buffers, temporary files.
Underlying hypervisor
- Uses customized version of MIT’s Xen.
- Xen provides 4 privilege modes – Guest OS executes in Ring 0 privilege mode and applications in EC2 executes in Ring 3 (least privilege).
- AWS firewall resides within Xen between physical network interface card and virtual network interface.
Elastic beanstalk
- Just upload the code, beanstalk will perform the provisioning.
- Supports docker.
Lambda
- Lambda code can be executed in response to an event such as uploading an asset in S3.
- It can also be used to respond to HTTP calls.
- Supports language such as Java, Python, Node JS.
- Supports scheduled events.
- Very very cheap.
- Pricing depends
- On number of requests.
- Duration of code being executed.