I am deploying my app to ap-southeast-2
and want to add a CloudFront origin-response handler. I am getting errors when trying to deploy a new cloudfront event function:
CloudFront associated functions have to be deployed to the us-east-1 region.
Here is my serverless code:
# Cloudfront
handleOriginResponse:
handler: cloudfront.handleOriginResponse
region: us-east-1 // <--this would be ideal
events:
- cloudFront:
eventType: origin-response
pathPattern: /*
origin:
DomainName: mywebsite.come
OriginPath: /
CustomOriginConfig:
OriginProtocolPolicy: match-viewer