Open jwerre opened 4 years ago
Not sure whats happening but when I deploy CloudFront trigger is not attached. It appears the after:aws:deploy:finalize:cleanup hook is not triggering. Here's my yaml if that helps:
after:aws:deploy:finalize:cleanup
--- service: my-lambda-edge provider: name: aws region: us-east-1 stage: ${opt:stage, 'staging'} runtime: nodejs12.x timeout: 120 stackName: ${self:service}-${self:provider.stage} logRetentionInDays: 90 deploymentBucket: name: my-lambda-edge-bucket role: my-iam-role environment: NODE_ENV: ${self:provider.stage} custom: distributions: staging: ------------- production: ------------- lambdaEdgePreExistingCloudFront: validStages: - staging - production package: exclude: - ./** include: - functions/*.js functions: request: handler: functions/request.handler events: - preExistingCloudFront: distributionId: ${self:custom.distributions.${opt:stage, self:provider.stage}} eventType: origin-request pathPattern: '*' includeBody: false response: handler: functions/response.handler events: - preExistingCloudFront: distributionId: ${self:custom.distributions.${opt:stage, self:provider.stage}} eventType: origin-response pathPattern: '*' includeBody: false plugins: - serverless-lambda-edge-pre-existing-cloudfront
sls --version Framework Core: 1.76.1 Plugin: 3.6.17 SDK: 2.3.1 Components: 2.32.0
I figured out the issue. If you deploy with the default stage and don't supply --stage flag the deployment hook is not triggered.
--stage
Not sure whats happening but when I deploy CloudFront trigger is not attached. It appears the
after:aws:deploy:finalize:cleanup
hook is not triggering. Here's my yaml if that helps: