ADVANCED EC2

Bootstrapping EC2 using User Data (10:25)

Alt text EC2 User Data

what is ec2 bootstrapping?

The process of configuring an EC2 instance to perform automated install & configuration steps ‘post launch’ before an instance is brought into service.

how to bootstrap an ec2 instance?

what is ec2 user data?

when does ec2 execute user data?

what exactly execute ec2 user data?

how many times does the ec2 user data be executed?

Alt text EC2 Bootstrapping

Alt text User Data - Key Points

what are drawbacks of ec2 user data?

  • It’s opaque to EC2.
  • NOT secure.
  • Limited to 16KB.

Alt text Boot-Time-To-Service-Time

[DEMO] Bootstrapping Wordpress Installation - PART1 (15:00)

[DEMO] Bootstrapping Wordpress Installation - PART2 (6:45)

Enhanced Bootstrapping with CFN-INIT (11:52)

Alt text AWS::CloudFormation::Init

what is `cfn-init`?

A powerful desired-state-like configuration engine which is part of the CFN suite of products.

Alt text cfn-init works with stack updates

Alt text CreatePolicy & Signals

what does `cloudformation`'s `createpolicy` do?

Creation policies create a ‘WAIT STATE’ on resources .. not allowing the resource to move to CREATE_COMPLETE until signalled using the cfn-signal tool.

what does `cfn-signal` do?

cfn-signal tells CloudFormation that the stack’s resource is at the desired state (it’s created).

[DEMO] CFN-INIT and CFN Creation Policies (12:29)

EC2 Instance Roles & Profile (4:18)

Alt text EC2 Instance Role & Instance Profile

Alt text EC2 Instance Profile’s credential

why use instance role/profile?

To grant permissions to applications running on Amazon EC2 instances via short-term credentials.

Using an IAM role to grant permissions to applications running on Amazon EC2 instances

[DEMO] Using EC2 Instance Roles (13:31)

SSM Parameter Store (6:16)

Alt text SSM Paremeter Store - Overview

what is ssm parameter store?

Parameter Store, a capability of AWS Systems Manager, provides secure, hierarchical storage for configuration data management and secrets management.

Alt text SSM Paremeter Store - Example

[DEMO] Parameter Store (16:11)

System and Application Logging on EC2 (6:15)

Alt text Logging on EC2

Alt text CloudWatch Agent - internal instance metrics and logging collection

[DEMO] Logging and Metrics with CloudWatch Agent-PART1 (11:51)

[DEMO] Logging and Metrics with CloudWatch Agent-PART2 (8:08)

EC2 Placement Groups (14:29)

Alt text EC2 Placement Groups - Placement strategies

Alt text Cluster Placement Groups

Alt text Cluster Placement Groups - Pros and Cons

Alt text Spread Placement Groups

Alt text Spread Placement Groups - Pros and Cons

Alt text Partition Placement Groups

Alt text Partition Placement Groups - Pros and Cons

Dedicated Hosts (8:56)

Alt text EC2 Dedicated Hosts

Alt text Instance capacity configurations - Single instance type support

Alt text Instance capacity configurations - Multiple instance type support

Alt text EC2 Dedicated Hosts - Limitations & Features

Enhanced Networking & EBS Optimized (6:57)

Alt text

what is aws enhanced networking?

The AWS implementation of SR-IOV.

what is sr-iov?

A standard allowing a physical host network card to present many logical devices which can be directly utilized by instances.

what is the benefit of sr-iov?

Lower host CPU usage, better throughput, lower and consistent latency.

what is ebs optimized?

A dedicated bandwidth for storage networking - separate from data networking.

Advanced EC2 Section Quiz