Skip to content

Instantly share code, notes, and snippets.

@allenheltondev
Created February 25, 2022 13:07
Show Gist options
  • Save allenheltondev/d18f06eecb028d3362952252af06d133 to your computer and use it in GitHub Desktop.
Save allenheltondev/d18f06eecb028d3362952252af06d133 to your computer and use it in GitHub Desktop.
Adding a Global Layer To Your SAM Template
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Runtime: nodejs14.x
Architectures:
- arm64
Tracing: Active
Timeout: 3
Handler: index.handler
Layers:
- !Ref DependencyLayer
Resources:
DependencyLayer:
Type: AWS::Serverless::LayerVersion
Metadata:
BuildMethod: nodejs14.x
Properties:
LayerName: dependency-layer
ContentUri: layers/
CompatibleRuntimes:
- nodejs14.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment