Welcome to 'Back to Basics'.
Hi, I am Shailaja Suresh, a Senior Solutions Architect with Amazon Web Services.
Let us familiarize ourselves on the ephemeral storage and EBS storage in EC2.
Ephemeral storage in an Amazon EC2 is nothing but the instance store
that provides block-level storage across many EC2 instance types.
This storage is preconfigured and pre-attached storage on the same physical server that hosts the EC2.
Amazon Elastic Block Store (EBS) is a block-level storage that can be attached to Amazon EC2 instances for persistent storage.
Once you attach a volume to an instance, you can use it as you would use a physical hard drive.
Okay, now that you have spun up your EC2 and installed the needed libraries.
And you would need storage beyond the instance store.
This is what you would do.
Let’s look at the pattern!
Number 1 - You attach an EBS volume to the EC2 instance to serve as additional persistent storage.
Number 2 - You create an Amazon Machine Image or AMI from the EC2 instance.
This AMI serves as the gold copy and comes in handy when you are required to spin up another EC2 with the same configuration.
Number 3 - You ensure that your architecture addresses point-in-time recovery of EBS volumes for disaster recovery,
data migration, and for backup compliance.
So you take backups of these EBS volumes called EBS snapshots and store them in S3.
The snapshot contains all of the required information that is needed to restore your data to a new EBS volume.
You automate this process to make it a low-touch design with as minimum manual intervention as possible.
So you will enable Amazon Data Lifecycle Manager on your EC2 instance.
Now, let’s touch on what Data Lifecycle Manager can do,
It protects valuable data by enforcing a regular backup schedule.
It helps to create standardized AMIs.
Also it helps to retain backups as needed per compliance.
And most of all, it helps to reduce your storage costs by deleting dated backups.
Number 5 - Amazon EBS and Amazon Data Lifecycle Manager emit events related to lifecycle policy actions.
The lifecycle of your snapshots and AMIs could be monitored by CloudWatch events
and notifications could be sent through Simple Notification Service (SNS).
At AWS, we prescribe Well-Architected architecture patterns to our customers.
So while discussing this pattern,
let us remind ourselves some common anti-patterns to save ourselves from falling into these traps.
Not backing up critical EC2 instances with EBS snapshots.
I’ve seen cases where all data was stored in an EC2 instance store and not backed by EBS snapshots.
This may make one lose all data in case of a manual intervention or service disruption.
Not creating AMIs for EC2 instances that require huge efforts to rebuild from scratch.
Now there is an effort that goes into configuring your EC2 instance,
say you install libraries, to host your application.
What if the EC2 instance gets accidentally terminated?
Then you would need to start all over again and spinning up a new EC2 instance.
Use AMIs - AMIs serve as the gold copy of your EC2 instances.
Charges incurred with excessive EBS snapshots.
I have seen cases where EBS snapshots are not enabled to retain only what is needed.
This is where Data Lifecycle Manger comes in.
Enable policies on Data Lifecycle Manager to retain and pay for only what is needed.
Some organizations have their audits show up unencrypted data in EBS volumes.
Encrypt EBS volumes when needed.
They go a long way to maintain the security posture of your organization.
Hope this pattern comes in handy when you start to spin up workloads using EC2 instances.
For more information, check out the links below.
Thanks for watching 'Back to Basics', see you next time.