AWS SA(04): The Deployment Parts
After setup the environment, Next step we need to take is deploy the resources we needed to AWS cloud. AWS also provide a bunch of services to support apply industry best practices into deployment strategy. But, to be honest, in this field, there is a very mature ecosystem/community exists already, like terraform, Github actions etc. They kinf of build some kind of industry standard, most user will intgerate AWS cloud deployment with them, rather than choose AWS provided services.
So in this episode, let's just quickly go through what kind of deployment services AWS provided, and what kind of deployment strategy it support.
Infra(Cloud Formation)
For deployment resources into AWS, AWS provide CloudFormation, a powerful tool for infrastructure as code (IaC), allowing you to define and manage AWS resources in a declarative way. It lets you model, provision, and manage AWS infrastructure using templates. These templates describe the desired state of your infrastructure and CloudFormation ensures resources match that state.
Components:
Best practices:
Serverless Application
AWS provide SAM (Serverless Application Model) for building serverless applications. It extends AWS CloudFormation to simplify the deployment and management of serverless resources such as AWS Lambda, API Gateway, DynamoDB, and more. it supports:
The process to use SAM:
Standard Application
AWS provided a bunch of tools to support industry CI/CD pipeline to build/deploy your application:
AWS CodeCommit:
AWS CodeBuild:
AWS CodeArtifact:
AWS CodeDeploy:
领英推荐
AWS CodePipeline:
SageMaker
Deployment Strategy
AWS provides several strategies to ensure that deployments are efficient, reliable, and scalable, we nee to choose the correct one based on our business requirements, service architecture, and risk tolerance:
In place
the previous version of the application on each compute resource is stopped, the latest application is installed, and the new version of the application is started and validated.
Linear
Linear deployment means traffic is shifted in equal increments with an equal number of minutes between each increment. You can choose from predefined linear options that specify the percentage of traffic shifted in each increment and the number of minutes between each increment.
Blue/Green
releasing applications by shifting traffic between two identical environments running differing versions of the application
Canary
incrementally deploy the new version, making it visible to new users in a slow fashion. As you gain confidence in the deployment, you will deploy it to replace the current version in its entirety.
All at once
all traffic is shifted from the original environment to the replacement environment all at once.
Conclusion
Based all the info above, the steps to build your deployment pipeline will be: