Skip to content

Deploy hook not firing #5

Description

@jwerre

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:

---
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions