Book Image

AWS Automation Cookbook

By : Nikit Swaraj
Book Image

AWS Automation Cookbook

By: Nikit Swaraj

Overview of this book

AWS CodeDeploy, AWS CodeBuild, and CodePipeline are scalable services offered by AWS that automate an application's build and deployment pipeline. In order to deliver tremendous speed and agility, every organization is moving toward automating their entire application pipeline. This book will cover all the AWS services required to automate your deployment to your instances. You'll begin by setting up and using one of the AWS services for automation –CodeCommit. Next, you'll learn how to build a sample Maven and NodeJS application using CodeBuild. After you've built the application, you'll see how to use CodeDeploy to deploy the application in EC2/Auto Scaling. You'll also build a highly scalable and fault tolerant Continuous Integration (CI)/Continuous Deployment (CD) pipeline using some easy-to-follow recipes. Following this, you'll achieve CI/CD for a microservice application and reduce the risk within your software development life cycle globally. You'll also learn to set up an infrastructure using CloudFormation templates and Ansible, and see how to automate AWS resources using AWS Lambda. Finally, you'll learn to automate instances in AWS and automate the deployment lifecycle of applications. By the end of this book, you'll be able to minimize application downtime and implement CI/CD, gaining total control over your software development lifecycle.
Table of Contents (11 chapters)

What this book covers

Chapter 1, Using AWS CodeCommit, covers the basic concepts of VCS. Here, you will learn how to create a repository in GitHub and upload local files to the remote repository. Then, you will learn CodeCommit in detail and also play with some operations, such as cloning using SSH or HTTPS and migrating from GitHub to CodeCommit.

Chapter 2, Building an Application Using AWS CodeBuild, introduces how to build two different applications developed in Java and NodeJS using CodeBuild. This chapter will also show you how you can use a build specification file.

Chapter 3, Deploying an Application Using AWS CodeDeploy and AWS CodePipeline, covers the basics of the deployment strategy used by CodeDeploy. Then, post that you will learn how to write an application specification file that helps CodeDeploy to deploy an application to the servers. You will also learn how CodePipeline is used to integrate the Developer Tools.

Chapter 4, Building a Highly Scalable and Fault-Tolerant CI/CD Pipeline, includes recipes which include the steps to create a highly scalable and fault-tolerant pipeline. The recipes include setting up CodeCommit, S3 buckets, Auto Scaling, CodeDeploy projects, and more.

Chapter 5, Understanding Microservices and AWS ECS, covers microservices and its deployment. You will also learn to play around with Docker containers. Then, you will learn about ECS and its components, and also how to deploy a containerized application in ECS.

Chapter 6, Continous Deployment to AWS ECS Using CodeCommit, CodeBuild, CloudFormation, and CodePipeline, contains recipes to build a pipeline for the continuous deployment of a containerized application to AWS ECS using other AWS services.

Chapter 7, IaC Using CloudFormation and Ansible, contains the syntax and structure that helps you write a CloudFormation template to spin-up AWS resources. It also includes a CloudFormation template that will help with setting up production-ready infrastructures. The same thing is also mentioned regarding Ansible.

Chapter 8, Automating AWS Resource Control Using AWS Lambda, contains recipes that are related to audit compliance and automation with AWS resources, such as creating an AMI of the EC2 instance using AWS Lambda and CloudWatch, sending notifications through SNS using Config and Lambda, and streaming and visualizing AWS CloudTrail logs in real time using Lambda with Kibana.

Chapter 9, Deploying Microservice Application in Kubernetes using Jenkins Pipeline 2.0, contains recipes covering the deployment of Kubernetes on AWS using KOPS and custom Ansible playbooks. You will also learn to use Jenkinsfile and using Jenkinsfile, deploy a containerized application in Kubernetes.

Chapter 10, Best Practices and Troubleshooting Tips, includes some best practices with CodeCommit and CodeBuild and also covers troubleshooting tips.