Week 4. Standing on the gas
January 26th, 2022We’re into Week 4 and the project and the conversations are really starting to click.
I’ve been focused on the last week on getting the landing page sorted out and dealing with getting images loaded into S3.
I am constantly amazed at how deep and dark the AWS hole can be and how long it takes to learn everything. I have setup S3 before in web app and thought it would be no sweat, but then I decided to update to the V3 of the SDK. Of course that brought a whole new level of confusion about what to import and how the specific functions worked. Plus, I split the “service” out as a separate class so that my team could use the S3 image uploader where ever they would like.
It all worked great. But then came the deployment to the real world. And of course it doesn’t work because I had setup the S3 bucket to host the pictures as a static website and created an alias in route 53 so I could display the images using “http://siteimages.farmwork.us/imageid.jpg.” However, I set the rest of the site up as https. So. Chrome auto corrects those http links to https and then they don’t find a home.
I ended up setting up a Cloudfront distribution in the mean time for siteimages.farmwork.us and pointed it to the S3 bucket. So it is happy now. But its kinda dumb to have a Cloudfront bucket only point there. So later in the project, I will update it so the Cloudfront points to our EC2 instances for anything other than farmwork.us/images and have that routing point to the S3 bucket. I can then make the S3 bucket only “accessible” by the Cloudfront distribution so it is a little more locked down as well.
Onwards and upwards!
Till next time devoted readers.