Skip to content

Instantly share code, notes, and snippets.

@serverlessunicorn
Created September 30, 2019 20:00
Show Gist options
  • Save serverlessunicorn/fee97cf92986e346f7ca3885582997b0 to your computer and use it in GitHub Desktop.
Save serverlessunicorn/fee97cf92986e346f7ca3885582997b0 to your computer and use it in GitHub Desktop.
TWagnerMediumBlogSampleCFTemplatePart4
NATPunchFunction:
Type: AWS::Serverless::Function
Properties:
Handler: natpunch.lambda_handler
Runtime: python3.7
CodeUri: natpunch.py # Local name; cloudformation package will rewrite to S3 URI
# Required Python modules are held in a Lambda layer; see the definition below.
Layers: [!Ref NATPunchFunctionPythonDependenciesLayer]
Role: !GetAtt NATPunchFunctionRole.Arn # Definition follows below
Environment:
Variables:
DB: !Sub 'NATPunchDatabase-${Stage}' # Keep consistent with DB name property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment