Last active
May 27, 2021 22:08
-
-
Save jwerre/10c52fb551ea178a66134b073f13ffdc to your computer and use it in GitHub Desktop.
Lambda@Edge Origin Request Event Handler - deployment configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
service: my-lambda-edge | |
provider: | |
name: aws | |
region: us-east-1 # Lambda@Edge need to be in us-east-1 | |
stage: ${opt:stage, 'production'} | |
runtime: nodejs14.x | |
stackName: ${self:service}-${self:provider.stage} | |
logRetentionInDays: 90 # this does not work but hopefuly it will someday🤞🏻 | |
memorySize: 128 # max memory size for viewer events is 128 MB | |
timeout: 5 # max timeout for viewer events is 5 | |
role: arn:aws:iam::<ACCOUNT_ID>:role/service-role/<ROLE_NAME> | |
package: | |
exclude: | |
- ./** | |
include: | |
- functions/*.js | |
functions: | |
originRequest: | |
handler: functions/origin_request.handler | |
events: | |
- preExistingCloudFront: | |
distributionId: <CLOUDFRONT_DISTRIBUTION_ID> | |
eventType: origin-request | |
pathPattern: '*' | |
includeBody: false | |
plugins: | |
- serverless-lambda-edge-pre-existing-cloudfront |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment