Last active
November 28, 2018 08:48
-
-
Save tkeeber/9fa0cf5f96b32b8e1438b20bae7a6985 to your computer and use it in GitHub Desktop.
cloudformation-basic-lambda-using-parameter-store
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: 'AWS::SSM::Parameter::Value<String>' | |
Default: 'MyDatabaseUsername' | |
DATABASE_PASSWORD: | |
Description: 'Required. The Database password' | |
Type: 'AWS::SSM::Parameter::Value<String>' | |
Default: 'MyDatabasePassword' | |
DATABASE_HOSTNAME: | |
Description: 'Required. The Database hostname' | |
Type: 'AWS::SSM::Parameter::Value<String>' | |
Default: 'MyDatabaseHostname' | |
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