Remove deployment s3 folder?

Dear Sir, Madam,

I noticed that, when I deploy my Lambda function with Serverless, I get a folder in S3 (which has for example the name ‘xxx-serverlessdeploymentbucket-abdefgh123’). Can I safely delete this folder?

I hope to hear from you soon. Thanks in advance.

Best regards,
ETD

No, it’s not recommended to delete this folder. The S3 bucket will be created to store your deployed function(s) code, along with the cloudformation template.

You can read more about how and why this bucket exists here.

Have a good day!

If I delete this folder, what potential impacts could it have on my deployed Lambda function or future deployments? Will it affect the function’s performance, availability, or ability to update the function in the future?

Yes. You can easily try this in a different AWS account. Remember in v4, the deployment folder is per-account, not per project or stage.