Serverless Stack — CI/CD — Blue-Green Deployments
About me
Full-stack software architect & entrepreneur
The problem I wanted to solve
I wanted to build a reusable serverless architecture with CI/CD and blue-green deployments.
What is Serverless Stack — CI/CD — Blue-Green Deployments?
The stack consists of an API, UI, and Async Tasks, but this isn’t the cool part.
The cool part is the built-in CI/CD via CodePipeline and Blue-Green deployments of Lambda.
CI/CD and Blue-Green deployments are very important for the stability and health of an application. It is important to deliver often and fail fast.
You can read more about this stack here: https://hackernoon.com/serverless-stack-ci-cd-blue-green-deployments-a6de63142094
Tech stack
I used CloudFormation to design the architecture and stack.
I used CodeBuild and CodePipeline to perform CI/CD.
The API is powered by API Gateway and Lambdas.
The UI is a static S3 website.
The Async Tasks is powered by SNS and Lambda.
The blue-green deployments are performed by AWS CodeDeploy.
Here is the AWS Pipeline:
The process of building Serverless Stack — CI/CD — Blue-Green Deployments
With this reusable stack the setup is easy. Just fork my git branch and create the pipeline stack. All subsequent changes to your code or infrastructure are automatically deployed.
Challenges I faced
CloudFormation is always time consuming but worth every minute in the end.
Key learnings
I learned how to perform blue-green deployments or AWS Lambdas.
Tips and advice
Here is the source code to get started. https://github.com/thestackshack/serverless-stack-cicd
Final thoughts and next steps
I'd love to get your feedback. Please let me know what you think of this stack.