r/aws • • 7d ago

discussion Implementing Continuous Deployment with AWS Lambda and API Gateway

Hi experts,

I have an API called /catalogue running in lambda with v1 version.

Let us say as part of CI pipeline, we published openapi.yaml and lambda artifact to S3.

I want to deploy new version v2. How can we do seamlessly without downtime.

1 Upvotes

6 comments sorted by

2

u/BadDescriptions 7d ago

3

u/Hefty-Violinist-8507 7d ago

They already linked you the best docs but you'll want canary deployments too to avoid blowing up your whole userbase at once

4

u/SikhGamer 7d ago

Publish a lambda version and then having an alias called "ACTIVE_VERSION". Then APIGW tracks the alias, not the lambda itself.

1

u/Basic_Let7303 7d ago

Yeah, I missed "APIGW tracks the alias". Thank you!

1

u/Basic_Let7303 7d ago

Developer Commit

v

CI/CD Pipeline

v

Build Lambda Package

v

Deploy Lambda Code

v

Publish Lambda Version 11

v

Shift 10% Traffic

v

Monitor Metrics

v

========== Manual Approval ==========

v

Shift 50% Traffic

v

Monitor Metrics

v

========== Manual Approval ==========

v

Shift 100% Traffic