Skip to content

Instantly share code, notes, and snippets.

@vittorio-nardone
Created October 7, 2020 11:52
Show Gist options
  • Save vittorio-nardone/a67b5031bc5c580444c166c5692866bb to your computer and use it in GitHub Desktop.
Save vittorio-nardone/a67b5031bc5c580444c166c5692866bb to your computer and use it in GitHub Desktop.
A sample of AWS Lambda Layer
SeleniumChromiumLayer:
Type: AWS::Lambda::LayerVersion
Properties:
CompatibleRuntimes:
- python3.7
- python3.6
Content:
S3Bucket:
Ref: BucketName
S3Key:
Fn::Sub: '${SourceFolder}/SeleniumChromiumLayer.zip'
Description: Selenium and Chromium Layer for Python3.6
SampleFunction:
Type: AWS::Lambda::Function
Properties:
Runtime: python3.7
Description: Sample function
Handler: src/lambda_function.lambda_handler
Role:
Fn::GetAtt: [ "SampleFunctionRole", "Arn" ]
Timeout: 15
MemorySize: 512
Code:
S3Bucket:
Ref: BucketName
S3Key:
Fn::Sub: '${SourceFolder}/SampleFunction.zip'
Layers:
- Ref: SeleniumChromiumLayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment