Book Image

AWS for System Administrators

By : Prashant Lakhera
Book Image

AWS for System Administrators

By: Prashant Lakhera

Overview of this book

Amazon Web Services (AWS) is one of the most popular and efficient cloud platforms for administering and deploying your applications to make them resilient and robust. AWS for System Administrators will help you to learn several advanced cloud administration concepts for deploying, managing, and operating highly available systems on AWS. Starting with the fundamentals of identity and access management (IAM) for securing your environment, this book will gradually take you through AWS networking and monitoring tools. As you make your way through the chapters, you’ll get to grips with VPC, EC2, load balancer, Auto Scaling, RDS database, and data management. The book will also show you how to initiate AWS automated backups and store and keep track of log files. Later, you’ll work with AWS APIs and understand how to use them along with CloudFormation, Python Boto3 Script, and Terraform to automate infrastructure. By the end of this AWS book, you’ll be ready to build your two-tier startup with all the necessary infrastructure, monitoring, and logging components in place.
Table of Contents (18 chapters)
1
Section 1: AWS Services and Tools
4
Section 2: Building the Infrastructure
7
Section 3: Adding Scalability and Elasticity to the Infrastructure
11
Section 4: The Monitoring, Metrics, and Backup Layers

Real-time use case to detach unused EBS volumes

In this section, you will see how you can save costs by cleaning up unused Elastic Block Storage (EBS) volumes. EBS costs are always overlooked, as the life cycle of an EBS volume is independent of the instance life cycle, which means that even if you delete an EC2 instance, the EBS volume of it is still there and incurs a cost.

As discussed in the last use case, there are multiple ways to achieve the end goal, but the approach we are going to use is a combination of Lambda and CloudWatch rules. We are following this approach as it gives us a high level of flexibility; for example, you can filter the volume based on whether they are used or unused.

To create a Lambda function, please follow the same steps (1-5) as described in the Real-time use case to clean up an unused AMI section. There are a few parameters you need to change:

  1. Similar to step 1, in this real-time use case, please change the function name to a new name...