SCC

Brasil

os cloud gurus

Software Cloud Consulting

Your software development, cloud, consulting & shoring company

How to copy a lambda function


By Wolfgang Unger


If you worked with Lambda you might have been in a situation where you want to test your changes on a existing Lambda Function
without changing the productive Lambda Version
If you have only code to copy, you can just copy it to the code editor, ok.
But if you have a Lambda Function with additional dependencies/packages it is little more effort.
One approach could also be versions and alias but to keep it simple it would be fine to copy the function and edit the code inside, wouldn't it?
Unfortunately there is no function in AWS to copy a Lambda
But you can do the following way:
In your existing Lambda use Actions- > Export Function
Download the zip file
SMM

Then create a new Lambda Function witht the same Runtime ( for Example Python 3.8)
This will create a hello World code example.
Now on the code editor your can use Upload From -> .zip File
SMM
That's it. Your Lambda was copied. Please have also a look in the preferences of the SessionsManager. You can setup looging ( to CloudWatch or S3)and Shell Profiles (Linux and Windows)

See also this video about SSM on my youtube channel
  • AWS Channel Wolfgang Unger - SSM
  • Back to Blog Overview
  • Autor


    ...

    Wolfgang Unger

    AWS Architect & Developer

    5 x AWS Certified

    1 x Azure Certified

    A Cloud Guru Instructor

    Certified Oracle JEE Architect

    Certified Scrum Master

    Certified Java Programmer

    Passionate surfer & guitar player