Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS Serverless Deployment Strategies


Deployment Strategies

Deployment strategies help you release your code into production.

There are three deployment strategies:

  • All-at-once
  • Canary
  • Linear

Some of the deployment strategies use traffic shifting.

Trafic shifting is migrating traffic from one service version to another.

Before transferring all production traffic to your new Lambda version, traffic shifting helps you test it.

When picking a deployment strategy, consider the customer impact, rollback, event model, and deployment tempo.


Deployment Strategies Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


All-At-Once

All-at-once deployments instantaneously switch traffic from the old to the new Lambda function.

When speed is important, all-at-once deployments can help.

Using this method, you may quickly update your code and make it available to all users.


Canary

You update your application code in a canary deployment and point a tiny fraction of production traffic to it.

It checks if the code is valid.

You redirect all traffic to it after ensuring that the new version is secure and free of faults.


Linear

Linear strategy is similar to Canary strategy.

Initially, you route a good amount of traffic to your updated code version.

A certain amount of traffic is sent to the new version until it reaches 100% of production traffic.


Deployment Preferences with AWS SAM

AWS SAM supports traffic shifting using aliases.

The alias can be considered as another name or identification.

AWS SAM templates allow you to employ all-at-once, canary, or linear deployments with Lambda functions.

This is done in the template's deployment options.

AM comes with various pre-built deployment settings.


Related reads:

Redeploy and Roll Back a Deployment with CodeDeploy

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

What are three deployment strategies?

1. 
2. 
3. 

Start the Exercise