Created
November 6, 2018 21:30
-
-
Save tkeeber/12f54b76016f0013f8027f5fc5fe2144 to your computer and use it in GitHub Desktop.
cloudformation-basic-lambda-env-vars.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Example template | |
Parameters: | |
DATABASE_USERNAME: | |
Description: 'Required. The Database username' | |
Type: 'String' | |
DATABASE_PASSWORD: | |
Description: 'Required. The Database password' | |
Type: 'String' | |
DATABASE_HOSTNAME: | |
Description: 'Required. The Database hostname' | |
Type: 'String' | |
Resources: | |
GetOrdersFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: orderlambda/ | |
Handler: app.lambdaHandler | |
Runtime: nodejs8.10 | |
Environment: | |
Variables: | |
DB_USER: !Ref DATABASE_USERNAME | |
DB_PASSWORD: !Ref DATABASE_PASSWORD | |
DB_HOSTNAME: !Ref DATABASE_HOSTNAME | |
Events: | |
HelloWorld: | |
Type: Api | |
Properties: | |
Path: /orders | |
Method: get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment