Skip to content

eoinsha/public-s3-lambda-code-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Publicly accessible Lambda code

An example of public Lambda code access in S3

In cases where you want to provide a CloudFormation template or Terraform module for a publicly-distributed Lambda function, you may need to provide public access to the code in an S3 bucket. You want to do this without making the public bucket's permissions too broad.

This repository is a brief example of how to make a ZIP-packaged Lambda Function code accessible publicly without exposing any unnecessary access. Only the Lambda service of any AWS account may retrieve the code, limiting the risk of security issues and high bucket owner costs.

Deployment

  1. Edit the bucket name in each template
  2. Deploy the bucket in the first account:
aws cloudformation deploy --stack-name=lambda-package-bucket --template bucket-template.yaml
  1. Deploy the Lambda function in any other account:
aws cloudformation deploy --stack-name=lambda-package --template template.yaml --capabilities CAPABILITY_NAMED_IAM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published