Prevent AWS CloudFront from Caching a File

Following on from my previous post: Static Website Hosting/Publishing Using AWS S3, AWS CloudFront, SSL Certificate And Custom FQDN, I had the need to ensure that a particular file was not cached by CloudFront and instead fetched each time. The particular example was that we wanted to use CloudFront, but in this case the website … Read more

Python Virtual Environment

A very quick overview of how you can use Python virtual environments. https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/ Install the Virtual Environment First install the virtual environment. Create the Virtual Environment Let’s say I have a project called “python-static-site”, so we’ll create the virtual environment within this project directory along with all the source files. The second argument is the … Read more

Using Gitlab CI/CD to Manage Configuration (e.g. Apache2) – Part 1

Infrastructure as Code (IaC) is a useful way to maintain the configuration of your infrastructure components. It provides a way that you can store your infrastructure or application’s configuration in a versioned location and then coupled with CI/CD brings you the benefits of being able to enforce gatekeeping on any changes to the configuration, automate … Read more

Uploading Files to AWS S3 Using CLI

I’ll assume you have your AWS CLI configured so you are able to login to an AWS account. If you need any help on this see: https://geekmungus.co.uk/?p=1167. Here’s a bit of a cheat sheet on how to use AWS S3 via the CLI. Listing Buckets Upload One File Upload the file called “myfile.txt” into the … Read more

AWS SSO Login Picking the Wrong Browser

When you are trying to login to AWS using the CLI tool, you may find that the window opens a tab in the wrong browser, to get around this you can apply a “–no-browser” at the end of the sso login command, for example: Now instead of opening a browser automatically, you’ll get the code … Read more