multiple sites for www redirect?
Is it possible to deploy multiple buckets within the one serverless.yml? For example, i'd like to be able to deploy domain.com with the client files and www.domain.com to redirect to domain.com or visa versa.
If this isn't supported currently I'd definately be interested in adding it as a feature if there is intrest.
Hello @trjstewart. You're correct that this isn't currently supported, but we're always open to new contributions.
I believe you can setup a redirect from one bucket to another and then would only have to maintain a single bucket of files. There are additional things we could also add such as managing CloudFront distributions with the static sites. Happy to have any sort of PR on either.
I'll assign this to you - feel free to ask for help from anyone on the contributors or maintainers list in the Readme!
Hello @trjstewart, any update on this ?
Hi @romainquellec! Feel free to help develop this too! I'll basically assign this issue to the first person who says they are working on developing the feature.
@trjstewart looks like there is community interest 😀! Let us know if you're interested in working on this.
For information, the base documentation for this is here: "Step 2.3: Configure Your Website Redirect".
@fernando-mc I have a working branch that deploys to multiple buckets. I've been testing against my own s3 buckets but not sure how to go about using yours before submitting a pull request?
@rstittda That's great! Ahh darn, did I leave them already created again? We still need to fix some of those tests. You can put in a PR for this and I'll be happy to take a look at it.
I was able to deploy to multiple buckets without any changes to this package.
client:
bucketName: ${opt:client}-${opt:stage, 'dev'}.domain.tld
distributionFolder: client/${opt:client}/dist
indexDocument: index.html
errorDocument: error.html
my file structure is
./serverless.yml
./client/client1/dist/
./client/client2/dist/
./client/client3/dist/
then to deploy
sls client deploy --stage dev --client client1
sls client deploy --stage dev --client client2
sls client deploy --stage dev --client client3
@rstittda would your branch e ready for a PR? It looks like the solution proposed just above doesn't allow one regular site plus a redirect like OP mentioned.
I’ll take a look this week at the PR as it has been a while.
From: Stefan @.> Sent: Tuesday, 13 April 2021 6:43 PM To: fernando-mc/serverless-finch @.> Cc: Russell Stitt @.>; Mention @.> Subject: Re: [fernando-mc/serverless-finch] multiple sites for www redirect? (#56)
@rstittdahttps://github.com/rstittda would your branch e ready for a PR? It looks like the solution proposed just above doesn't allow one regular site plus a redirect like OP mentioned.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/fernando-mc/serverless-finch/issues/56#issuecomment-818582846, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOKNSP3E6DFLRLTDDQLGIX3TIQDKNANCNFSM4E73I3ZQ. Russell Stitt Technical Development Lead
Data Action Phone 08 8201 1000 | Service Desk 08 8201 1400 Adelaide | Melbourne | Sydney
Data Action Pty Ltd, Commercial In Confidence: The content of this message is confidential and is to be used solely for the purposes provided. If you have received this message in error please delete the document and notify Data Action immediately. Think green before you print this screen.