Reputation: 1598
If I have several AWS Lambda functions, is it possible to specify deployment configuration for all three functions in a single YML file, or do I need to write specific YML file for each Lambda function?
Upvotes: 0
Views: 1789
Reputation: 8464
Yes- you can have multiple functions in the same serverless framework service definition.
For example (you can see further information in the documentation):
service: myService
provider:
name: aws
runtime: nodejs6.10
functions:
functionOne:
handler: handler.functionOne
description: optional description for your Lambda
events: # All events associated with this function
- http:
path: users/create
method: post
functionTwo:
handler: handler.functionTwo
events:
- s3: photos
functionThree:
handler: handler.functionThree
memorySize: 512 # function specific
Upvotes: 2