Where in S3 my Lambda code stored

10,312

Solution 1

If you upload your source code to your own S3 bucket before creating the Lambda function, then you will know the path to your source code. Note that simply editing the code in S3 will not update your Lambda function. See link below. Amazon will copy your code from your bucket to Amazon's S3 bucket.

If you upload your code in the AWS console when you create the Lambda function, then it is stored in an Amazon S3 location that you cannot access.

The end result is that your code is located in a private Amazon S3 bucket that you cannot access.

AWS Lambda Function Code

Solution 2

The Lambda service stores your code encrypted in an S3 bucket. AWS doesn't provide any more specific information than that. It's possible that the service has its own S3 bucket(s) and they individually encrypt all objects that they store there.

No, you can't access the Lambda service's S3 bucket(s) directly, but you can download the code you previously uploaded to your Lambda function. Go to the AWS Lambda console, select your Lambda function, then click Actions | Export function, then click Download deployment package. Note: if your code was written in Java (or other compiled language) then the download will contain compiled files, not the original source code.

enter image description here

Share:
10,312
Some Java Guy
Author by

Some Java Guy

I did Java/J2EE for long time, now AWS architecture.

Updated on July 27, 2022

Comments

  • Some Java Guy
    Some Java Guy almost 2 years

    I have read the Lambda FAQ and it says it stores my code in S3 and it is encrypted.

    Where in S3 is it stored and can I decrypt it to edit my code?