Skip to content

Instantly share code, notes, and snippets.

@ArionMiles
Last active May 6, 2020 13:00
Show Gist options
  • Save ArionMiles/f57ca40f83d0445d69edf02d92d9ad45 to your computer and use it in GitHub Desktop.
Save ArionMiles/f57ca40f83d0445d69edf02d92d9ad45 to your computer and use it in GitHub Desktop.
Sample template for blogpost on packing ELF binaries into lambda layers
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: Serverless application to generate random identities.
Resources:
RigFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: lambda_function.lambda_handler
Runtime: python3.8
CodeUri: './src/'
Description: 'Serverless function for rig (random identity generator).'
MemorySize: 128
Timeout: 3
Policies:
# To be able to write logs to CloudWatch
- AWSLambdaBasicExecutionRole
Layers:
- Ref: RigLayer
RigLayer:
Type: AWS::Serverless::LayerVersion
Properties:
CompatibleRuntimes:
- python3.8
ContentUri: './rig.zip'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment