diff --git a/org-formation/800-redirects/_tasks.yaml b/org-formation/800-redirects/_tasks.yaml index 6efe944c..0aebeaf8 100644 --- a/org-formation/800-redirects/_tasks.yaml +++ b/org-formation/800-redirects/_tasks.yaml @@ -422,3 +422,17 @@ TreatAdApexRedirect: TargetDomainName: "treatad.org" AcmCertificateArn: "arn:aws:acm:us-east-1:797640923903:certificate/e8e438c6-8b58-4c39-b63d-d9c2a051e068" RedirectFctName: !Sub '${resourcePrefix}-treatad-apex-redirect-cloudfront-fct' + +# Issue IT-4466, redirect www.cancercomplexity.synapse.org to cancercomplexity.synapse.org +# This requires manually adding a CNAME record in the synapse.org hosted zone +CancerComplexityWebRedirect: + Type: update-stacks + Template: s3-redirect-bucket.yaml + StackName: !Sub '${resourcePrefix}-cancer-complexity-web-redirect' + StackDescription: Setup a redirect from www.cancercomplexity.synapse.org to cancercomplexity.synapse.org + DefaultOrganizationBindingRegion: !Ref primaryRegion + DefaultOrganizationBinding: + Account: !Ref SageITAccount + Parameters: + RedirectFrom: www.cancercomplexity.synapse.org + RedirectTo: cancercomplexity.synapse.org diff --git a/org-formation/800-redirects/s3-redirect-bucket.yaml b/org-formation/800-redirects/s3-redirect-bucket.yaml new file mode 100644 index 00000000..9dbe03b7 --- /dev/null +++ b/org-formation/800-redirects/s3-redirect-bucket.yaml @@ -0,0 +1,56 @@ +# Setup a static website bucket for the sole purpose of +# redirecting all request to another website. +AWSTemplateFormatVersion: 2010-09-09 +Description: >- + Provision a S3 website with redirect rules +Parameters: + RedirectFrom: + Description: Domain name of the old website (redirected from) + Type: String + AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?