AWS Lambda Alias Routing

Lambda Version Alias

This example provides house alias routing can be used in API Gateway and in Kinesis Streams (lambda event mapping to alias)

High level Steps

  • The solution has “src” and “templates”. src has the java sample lambda. templates have the .tf files.
  • Upon “mvn clean package” “target” folder will have the jar generated.
  • “” has the aws cli/bash commands to deploy the lambda function and modify the alias accordingly
  1. Initial Setup
    • Build java source
    • Run terraform templates to create API Gateway/Lambda. This pushes the above jar to the lambda
    • Created API points to lambda:active alias. “red” and “black” aliases are also created at this point
  2. Modify the code
    • Run the “”. This is similar to GIT pipelines deploying the function
    • At this point the the cli sets current version as red and new code being deployed as black
    • cli sets the routing pointing to black and additional routing config weightage for the fallback/red

By shivaramani

I am passionate developer, application architect. Like to try different programming languages, especially Microsoft workloads in AWS. Enjoys learning about different AWS services and focuses on developer experience for building applications using compute, containers & serverless architecture.

I like to build experience around software development(SDLC), infrastructure as code, automating and providing a CI/CD solution

Leave a Reply

Your email address will not be published. Required fields are marked *