Lambda And CloudFormation
Create a lambda function using CloudFormation
Inline
- Use
Code.ZipFileproperty
- Cannot include function dependencies, suitable for short code
Through S3

- Store the lambda function zip in S3.
- Must provide
S3Bucket: name of the bucketS3Key: full path to zipS3ObjectVersion: if the bucket is versioned.
- Note: if you update the code in S3 but doesn't update
S3Bucket,S3Key, orS3ObjectVersion.- CloudFormation won't update your function
For multiple account
- Use Execution Role in CloudFormation level or Bucket Policy in S3 level
