In this post, we would be solving two problems. The first one is “How to create CI/CD pipeline for Hashicorp Packer AMI builder” and the second one is “How to automatically refresh AWS Autoscaling Group instances automatically without any downtime.”

Let’s talk about the scenario which I have created to demonstrate the solution for the above two problems. So, we would be creating a simple web server based on Apache HTTPd service. It will be highly available using the Autoscaling group backed by Launch Template and load balanced with help of Application Load Balancer. Launch template will have a “PreBuild AMI with web application” and a simple user data script to start Apache HTTPd.

Architecture:

Packer CI/CD Pipeline and ASG Instance Refresh

#terraform #serverless #aws

Serverless- Packer AMI Build CI/CD and ASG Instance Refresh
3.10 GEEK