Guest User

Untitled

a guest
Nov 8th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. AWSTemplateFormatVersion: '2010-09-09'
  2. Transform: AWS::Serverless-2016-10-31
  3. Description: Example template
  4.  
  5. Parameters:
  6.  
  7. DATABASE_USERNAME:
  8. Description: 'Required. The Database username'
  9. Type: 'AWS::SSM::Parameter::Value<String>'
  10. Default: 'MyDatabaseUsernamename'
  11.  
  12. DATABASE_PASSWORD:
  13. Description: 'Required. The Database password'
  14. Type: 'AWS::SSM::Parameter::Value<String>'
  15. Default: 'MyDatabasePassword'
  16.  
  17. DATABASE_HOSTNAME:
  18. Description: 'Required. The Database hostname'
  19. Type: 'AWS::SSM::Parameter::Value<String>'
  20. Default: 'MyDatabaseHostname'
  21.  
  22. Resources:
  23.  
  24. GetOrdersFunction:
  25. Type: AWS::Serverless::Function
  26. Properties:
  27. CodeUri: orderlambda/
  28. Handler: app.lambdaHandler
  29. Runtime: nodejs8.10
  30. Environment:
  31. Variables:
  32. DB_USER: !Ref DATABASE_USERNAME
  33. DB_PASSWORD: !Ref DATABASE_PASSWORD
  34. DB_HOSTNAME: !Ref DATABASE_HOSTNAME
  35. Events:
  36. HelloWorld:
  37. Type: Api
  38. Properties:
  39. Path: /orders
  40. Method: get
Add Comment
Please, Sign In to add comment