Reputation: 993
I had made a lambda function in the past which I want to change. At the time of making it there were no layers, so I was forced to use a deployment package. I have published this version under an alias, and would like to modify the $latest version .
However, in the $latest version, which is editable, the only code entry types available are zip and S3, the code editor is not there. How can I remove the deployed package so I can use a layer with some libraries, and write the code into the editor.
Upvotes: 1
Views: 1733
Reputation: 1
Just create a zip file of your code only and upload it using 'upload a zip file'. This will replace your existing package with a smaller code file that can me edited via online editor. NOTE: only zip your lambda_function.py file and nothing else. Rest you can upload via layers as you said.
Upvotes: 0
Reputation: 4480
Easiest way would be to create a new lambda, enter your code in the editor and then export the function as a zip file. Then just go over to your original lambda and upload this zip file. You can delete the new lambda you created after you do this.
Upvotes: 1