Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where in S3 my Lambda code stored

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?

like image 278
Some Java Guy Avatar asked Oct 31 '17 18:10

Some Java Guy


People also ask

Where does Amazon S3 store Lambda code?

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.

Can I access the Lambda service's S3 bucket (s)?

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.

Where does Lambda store my Lambda code?

The Lambda service stores your function code in an internal S3 bucket that’s private to your account. Each AWS account is allocated 75 GB of storage in each Region. This is an adjustable quota that can be raised by requesting a quota increase. Code storage includes the total storage used by both Lambda functions and layers.

How do I trigger an S3 function from a lambda function?

For Role name, enter my-s3-function-role . Under S3 trigger, choose the S3 bucket that you created previously. When you configure an S3 trigger using the Lambda console, the console modifies your function's resource-based policy to allow Amazon S3 to invoke the function.


2 Answers

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

like image 197
John Hanley Avatar answered Oct 16 '22 23:10

John Hanley


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

like image 12
jarmod Avatar answered Oct 17 '22 00:10

jarmod