Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternative cloudfront domains wiped on each deploy #1008

Open
tomyates opened this issue Aug 11, 2021 · 2 comments
Open

alternative cloudfront domains wiped on each deploy #1008

tomyates opened this issue Aug 11, 2021 · 2 comments

Comments

@tomyates
Copy link

I have the following serverless.yaml:

component: website               # (required) name of the component. In that case, it's website.
name: sa-front                   # (required) name of your website component instance.
app: sa-front                    # (optional) serverless dashboard app. default is the same as the name property.
stage: dev                       # (optional) serverless dashboard stage. default is dev.

inputs:
  domain: uat.domainname.com   # (optional) domain name. this could also be a subdomain.
  region: eu-west-1              # (optional) aws region to deploy to. default is us-east-1.
  src:
    src: ./src
    hook: npm run build
    dist: ./build

When I run sls deploy it wipes any alternative domains I've added in cloudfront and I have to re-add them manually.
Is there a way of setting this alternative domains in the serverless.yaml file?

@tomyates
Copy link
Author

Anyone got any thoughts? Thinking I could write a script to add the cnames to cloudfront after sls deploy?

@tomyates
Copy link
Author

Solved this issue by just creating a new CloudFront instance for all the alternative domains which pointed to the same s3 bucket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant