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

Set Default Root Object for Statically Hosted Website on AWS CloudFront (AWS CloudFront Functions)

A standard AWS CloudFront distribution is set to automatically serve the index.html file of a website when a client requests the root of the site, e.g. https://www.geekmungus.co.uk and does not specify any specific file or file within a sub-directory. However in certain instances your clients may request a page as follows e.g: https://www.geekmungus.co.uk/studies within which an index.html … Read more

Static Website Hosting/Publishing using AWS S3, AWS CloudFront, SSL Certificate and Custom FQDN

Amazon CloudFront is a content delivery network operated by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers to cache content, such as web videos or other bulky media, more locally to consumers, to improve access speed for downloading the content (citation). Although AWS CloudFront can be used as a CDN (caching … Read more

Block Admin Page Using AWS WAF Example

If you are using the AWS Web Application Firewall (WAF) on your Application Load Balancer or other supported AWS entity, you probably don’t want any administrative interfaces of the web application presented directly to the Internet without some form of restriction; perhaps to a range of IPv4 addresses you want to restrict. Adding a rule … Read more

Example AWS Application Load Balancer (ALB)

The AWS application load balancer is a key infrastructure component for providing access to your application to the Internet, or even for use within your VPC between components. In this example we’ll create a VPC, then within deploy 2 private and 2 public subnets, we’ll then attach an Internet Gateway, a NAT gateway (to allow … Read more

Getting Started with AWS Cloudformation

AWS Cloudformation is a tool and declaritive language you can use to declare what you want your “stack” (i.e. your deployment of AWS resources) to look like. You define all the resources you want AWS to spin up in a blueprint document, click a button, and then AWS magically creates it all. This blueprint is … Read more

AWS with Python3 using Boto3 Quickstart (Linux)

Following on from the https://www.geekmungus.co.uk/aws-cli-quick-start-linux guide, let’s see about how you can connect to your AWS from Python3 using Boto3. If you’ve not already done it, and if you’re not using the “default” credentials, you can specify a particular profile to use by adding it to an environment variable for example the below; where the … Read more

AWS CLI Quick Start (Linux)

A quick guide to getting started with AWS CLI from your Linux machine. Amazon provide some good documentation (see links below), but I’ve summerised the key steps here for brevity. Install or Update the AWS CLI Firstly install the AWS CLI package with: Once installed, we now need to get the AWS CLI configured. Quick … Read more