AWS
- Delete AWS CloudFront Cache Automatically when Building and Deploying with CodeBuild
I use AWS CodeBuild to build and then deploy this Hugo static site to s3. The site is also sat behind Amazon’s CloudFront CDN and after a sucessful deployment I wanted to delete the cache automatically so I could see the changes from the build immedietly.
- Deploy Dotnet Core Blazor Client Side Static Site to AWS Amplify
I have been playing around with .NET Core and Blazor recently to create a client side application. When it came to deploying the site I thought I would try using something different, in this case it was [Amazon’s Amplify] (https://aws.amazon.com/amplify/) which appears to be Amazon’s answer to Netlify.
- Deploy Static Site to AWS on Commit
This is a quick cheat sheet for the steps involved to create a manual pipeline to deploy a static site with CDN and HTTPS to AWS automatically on commit, the simple solution nowadays is to use [Amazon’s Amplify] (https://aws.amazon.com/amplify/) but that wasn’t around back when I had to do this, but you might also need it if you have some non standard build requirements.
- Running a Custom Docker Image on Amazon CodeBuild
I needed to use a custom docker image for some Dotnet Core 3 work with Amazon CodeBuild and hit into a few issues that took a bit of digging around to find, so thought I’d leave the here should anyone else need the same info.
- Hugo NoSuchKey on Sub Folders After Deploying to Amazon S3 and CloudFront
After deploying this blog to Amazon S3 with CloudFront the main page rendered correctly but any pages in sub folders like /posts or /posts/post-vanity-url would recieve the following error: <Error> <Code>NoSuchKey</Code> <Message>The specified key does not exist.</Message> <Key>{path}</Key> <RequestId>{RequestId}</RequestId> <HostId> {HostId} </HostId> </Error> Hugo uses directory URLs by default (posts/post-vanity-url) instead of files names (/posts/post-vanity-url/index.html). S3 is an object storage system not a file system. When a directory URL is passed to the server, it looks for the default root object in that directory. Asking for a directory fails to retrieve the index.html file in that folder.
- Building Hugo Extended on AWS CodeBuild
After upgrading my Hugo theme to the Hyde inspired Hyde-Hyde theme I also needed to switch from the standard Hugo build to the extended build in order to use the pipes feature. After successfully installing the new theme locally I hit into problems running the extended version of Hugo on AWS CodeBuild. First I received the following error: