Hi,
I have a React application on AWS S3 managed by CloudFront.
I want to generate a dynamic sitemap using lambda edge function, I tried to do it with serverless but on new deploy the manual configuration is override and I do not know how to configure it in serverless.yml
This is my serverless.yml
service: app
provider:
name: aws
runtime: nodejs14.x
environment:
STAGE: ${opt:stage, self:provider.stage}
custom:
stage: ${opt:stage, self:provider.stage}
funcsPerStage:
staging:
auth:
handler: handler
events:
- cloudFront:
eventType: viewer-request
origin: s3://xxx.s3.amazonaws.com/front/staging
functions: ${self:custom.funcsPerStage.${self:custom.stage}}
The deployment is working fine, but I need to set up
- Alternate domain name
- Custom SSL certificate
- Default root object
- Error pages
How can I do it with my serverless configuration ?
Thanks