Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

578
Views
Downgrade to previous version of AWS Lambda

Working with Amazon Lambda functions I use versioning feature which is provided by AWS Lambda functionality. Each time when I deployed new version of my artifact to AWS I create new version of function and publish it (using popup from screenshot).

enter image description here

But how can I publish any previous version of my function (for example when I need to rollback my last publication)?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You should provide each new version with an alias.

From the AWS Documentation

In contrast, instead of specifying the function ARN, suppose that you specify an alias ARN in the notification configuration (for example, PROD alias ARN). As you promote new versions of your Lambda function into production, you only need to update the PROD alias to point to the latest stable version. You don't need to update the notification configuration in Amazon S3.

The same applies when you need to roll back to a previous version of your Lambda function. In this scenario, you just update the PROD alias to point to a different function version. There is no need to update event source mappings.

over 4 years ago · Santiago Trujillo Report

0

One solution I've found that works if your in a pinch is to go to a previous (working) version of lambda, download the deployment package, redeploy the downloaded zip package using the aws cli. I'm sure there is a more elegant solution but if you're in a pinch and you need something right now this works.

$ aws lambda update-function-code \
--function-name my_lambda_function \
--zip-file fileb://function.zip
over 4 years ago · Santiago Trujillo Report

0

In order to rollback to a specific version, you need to point the alias that are assigned to the current version to the version you want to rollback to.

For example: My latest version is 20 and has an alias 'Active'. For me to rollback or remove the version 20, I need to remove the alias or reassign it to another version. So if I point my alias to version 17 then lambda will take the version 17 as the default or prod version.

you can update the alias here:

https://myRegion.console.aws.amazon.com/lambda/home?region=myRegion#/functions/functionName/aliases/Active?tab=graph

(Update myRegion and functionName with relevant values.)

In the above specified page go to 'Aliases' section, click on 'Version' dropdown (by default it will display the version for which the alias is assigned to). Select the version that your alias want to point to and click on save.

Thats All !!!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!