Problem I have a bunch of static html websites th...
# general
Problem I have a bunch of static html websites that need hosting. Other infrastructure is already in AWS (S3 buckets or EC2). However, because the web-pages need to respond to the client’s
header or a saved cookie, I think we’ll have to do some URL rewriting (to ensure transparency and SEO). For example,
should forward to
by default, or whatever language the header/cookie contained. Solutions 1. Client-side Javascript “cloaking” etc are off the table, I think. Doesn’t play well with SEO and is annoying for clients. 2. Use AWS S3 and web-page redirect: 3. Host the site in a Kubernetes container with nginx/apache. Of 2. and 3. I am leaning towards 2. because it’s probably easiest to set up for now. Both could be implemented using Pūlumi, and that would be the right way to go about it. What are your thoughts, and does Pūlumi handle the redirect configurations for 2.?
(2) is certainly easier if it will work for all your requirements, so I'd suggest starting with that and then falling back to (3) if you hit some wall (due to potential S3 hosting limitations). Our site is actually served from an S3 bucket, using the Pulumi program here (which includes also the Route53, CloudFront, etc. needed for that site's hosting): We don't use redirect rules for that site, but they area available via the Pulumi API. See
at and the format of routing rules here:
@miniature-potato-84713 I would actually advise always going with the managed option if you don’t need the flexibility of the orchestrator.
@white-balloon-205 is correct here IMO
Neat, thanks @white-balloon-205 for the links! I’ll get to it this week/end/ish. Before Christmas for sure 😄
@white-balloon-205, looks like the repo that implements
is (very) similar to this example ?
Yes - that's right!
👍 1
…and I can tie the Github actions into it as well, so that a push to
will update the S3 content objects?
Yep. You can do something simple and already available like Travis - that’s what the docs site I linked above does - you can see how it’s Travis job deploys to the corresponding stack for some branches (like
). If you have access to Actions, you could do that too in a similar way.
@white-balloon-205, getting started on this now.
pulumi new
is probably best, but the
would be a