silvermine / serverless-plugin-cloudfront-lambda-edge

Adds Lambda@Edge support to Serverless
MIT License
296 stars 41 forks source link

Use same lambda for many distributions #2

Closed jjchiw closed 6 years ago

jjchiw commented 6 years ago

Hi, is there a way to use a lambda in two or more distributions something like this

myHandler:
    name: 'myHandler-origin-request'
    handler: handler.main
    memorySize: 128
    timeout: 1
    lambdaAtEdge:
        - distribution: 'distribution1'
           eventType: 'origin-request'
        - distribution: 'distribution2'
           eventType: 'origin-request'
jthomerson commented 6 years ago

Not currently, but if you want to submit a PR we'd be happy to review and accept it. Please see https://github.com/silvermine/silvermine-info#contributing for info on contributing.

jthomerson commented 6 years ago

@jjchiw FYI: 2.0.0 was just released that includes this. Let us know if you see any issues. Thanks!