AWS CLI to show AWS S3 Bucket Size
From the AWS CLI you can easily see how big a AWS S3 Bucket, firstly login to the AWS CLI and then you can run the command:
The ramblings of a computer geek
From the AWS CLI you can easily see how big a AWS S3 Bucket, firstly login to the AWS CLI and then you can run the command:
Its always best to be using a user account authenticated via SSO (so you can have additional levels of security, e.g. MFA) on-top, and access AWS resources using a temporary Role (to provide the permissions). For most use cases e.g. interacting with the Web Console, using the CLI or performing development tasks via Cloudformation templates … Read more
We had a need to upload a large volume of data to AWS S3, obviously we want this to upload as fast as possible, we choose to use the AWS S3 Sync tool; however to get the most performance out of it, you need to perform some tweaks to the configuration. Although you can make … Read more
Here’s a quick example configuration. I’m assuming you already have the AWS CLI packages installed, but if you need to use SSO to login to your AWS Organisation/Account, you can use the following example. AWS CLI Configuration File The AWS configuration file that should be located in: ~/.aws/config, with the contents such as: So let’s … Read more
The Amazon Elastic Container Service (ECS), specifically Fargate allows you to run containers on an ad-hoc basis. The following guide assumes you have already deployed an Amazon Elastic Container Registry (ECR), built your image, pushed it to the ECR and have obtained the Repository URI. The guide also uses local Terraform state, please see the … Read more
The below gives a simple example showing how you can deploy a containerised workload: a NGINX web server in this example which has two (or more) containers (tasks) running on AWS Fargate, presented behind a “Service” definition which is then presented to the Internet via an Application Load Balancer (ALB) where a certificate is obtained … Read more
The Amazon Container Registry (ECR) allows you to store the images within the cloud, for the purposes of this example we’ll use a simple container using a Dockerfile that creates an Apache web server that says “Hello World!”. Repository The example Terraform definitions can be found within Gitlab: Step 1 – Deploy Terraform You first need … Read more
When using Route53 for DNS, you have the option of using a special AWS only type of record for the Apex or Root record of the domain (zone). Taking an example domain.com, you typically would have a website which has an A record called www.domain.com. But what if you want to have the apex of the domain … Read more
Its recommended to manage your EC2 instances via SSM if/when you need console access rather than using SSH which can pose a security risk. Of course if you need to get or put files into the EC2 instance this can be a bit tricky, however if you have an S3 bucket available you can use … Read more
BASH Prompt via SSM by Default To set the BASH as the default prompt when using SSM, within the AWS Console browse to: Then add the following: Then attempt to login via SSM, you should now find you are getting the BASH prompt. Fancy Colours Edit the .bashrc file within the user home directory and set as … Read more