0

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?

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.