- Newest
- Most votes
- Most comments
The best way to do this is to create a CloudFormation template to create the Lambda function. That way you can deploy it as many times as you like in as many accounts as you like. Sure, it's a bit of extra work up front but it saves a bunch of effort later on.
To duplicate a lambda function, select the lambda function you want to duplicate on lambda console, then you can go Actions > Export Function > Download deployment package (at the top right corner)
This downloads a .zip file of the function. Then create a new Lambda, and go "Upload from" (right above the code editor) > ".zip file"
N.B: This duplicates the code and npm modules etc. Not the triggers or permissions of the function. This has to be set manually.
I'm already uploading code; what I want to replicate is the configuration. Stack exchange says there's no easy way to do so on AWS. I was hoping a better answer had been created since then, since the use case seems self-evident and implementation would seem trivial.
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Probably good advice. It's another hoop fir a new AWS developer to learn to jump through, though. And it still seems it would have been trivial for AWS to build this into the lambda console... Oh well. So far, it seems like AWS has so many offerings that they can't spend enough time really polishing the UI or docs for any of them.