serverless.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Welcome to Serverless!
  2. #
  3. # This file is the main config file for your service.
  4. # It's very minimal at this point and uses default values.
  5. # You can always add more config options for more control.
  6. # We've included some commented out config examples here.
  7. # Just uncomment any of them to get that config option.
  8. #
  9. # For full config options, check the docs:
  10. # docs.serverless.com
  11. #
  12. # Happy Coding!
  13. service: ambt-anoicos
  14. # app and org for use with dashboard.serverless.com
  15. #app: your-app-name
  16. #org: your-org-name
  17. # You can pin your service to only deploy with a specific Serverless version
  18. # Check out our docs for more details
  19. frameworkVersion: '2'
  20. provider:
  21. name: aws
  22. runtime: python3.8
  23. lambdaHashingVersion: 20201221
  24. # you can overwrite defaults here
  25. # stage: dev
  26. # region: us-east-1
  27. # you can add statements to the Lambda function's IAM Role here
  28. # iamRoleStatements:
  29. # - Effect: "Allow"
  30. # Action:
  31. # - "s3:ListBucket"
  32. # Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
  33. # - Effect: "Allow"
  34. # Action:
  35. # - "s3:PutObject"
  36. # Resource:
  37. # Fn::Join:
  38. # - ""
  39. # - - "arn:aws:s3:::"
  40. # - "Ref" : "ServerlessDeploymentBucket"
  41. # - "/*"
  42. # you can define service wide environment variables here
  43. # environment:
  44. # variable1: value1
  45. # you can add packaging information here
  46. #package:
  47. # patterns:
  48. # - '!exclude-me.py'
  49. # - '!exclude-me-dir/**'
  50. # - include-me.py
  51. # - include-me-dir/**
  52. functions:
  53. hello:
  54. handler: handler.hello
  55. # The following are a few example events you can configure
  56. # NOTE: Please make sure to change your handler code to work with those events
  57. # Check the event documentation for details
  58. # events:
  59. # - httpApi:
  60. # path: /users/create
  61. # method: get
  62. # - websocket: $connect
  63. # - s3: ${env:BUCKET}
  64. # - schedule: rate(10 minutes)
  65. # - sns: greeter-topic
  66. # - stream: arn:aws:dynamodb:region:XXXXXX:table/foo/stream/1970-01-01T00:00:00.000
  67. # - alexaSkill: amzn1.ask.skill.xx-xx-xx-xx
  68. # - alexaSmartHome: amzn1.ask.skill.xx-xx-xx-xx
  69. # - iot:
  70. # sql: "SELECT * FROM 'some_topic'"
  71. # - cloudwatchEvent:
  72. # event:
  73. # source:
  74. # - "aws.ec2"
  75. # detail-type:
  76. # - "EC2 Instance State-change Notification"
  77. # detail:
  78. # state:
  79. # - pending
  80. # - cloudwatchLog: '/aws/lambda/hello'
  81. # - cognitoUserPool:
  82. # pool: MyUserPool
  83. # trigger: PreSignUp
  84. # - alb:
  85. # listenerArn: arn:aws:elasticloadbalancing:us-east-1:XXXXXX:listener/app/my-load-balancer/50dc6c495c0c9188/
  86. # priority: 1
  87. # conditions:
  88. # host: example.com
  89. # path: /hello
  90. # Define function environment variables here
  91. # environment:
  92. # variable2: value2
  93. # you can add CloudFormation resource templates here
  94. #resources:
  95. # Resources:
  96. # NewResource:
  97. # Type: AWS::S3::Bucket
  98. # Properties:
  99. # BucketName: my-new-bucket
  100. # Outputs:
  101. # NewOutput:
  102. # Description: "Description for the output"
  103. # Value: "Some output value"