AWS CLI start instance

I wanted to start an instance from my terminal rather than going onto the AWS console. Firstly choose the profile, then search for the instance: export AWS_PROFILE=xyze aws ec2 describe-instances –output table | grep -B150 backup | grep InstanceId –output table presents the output as a nice table rather than json. Grep searches for the … Read more

Daily Backups

Amazon’s guide to AWS Backup is here: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html Our Backup plan is called xyze-prod-backup and can be viewed by clicking on ‘Manage Backup plans’ from the AWS Backup dashboard. I’ve set up a backup rule called ‘DailyBackups’ which are kept for 7 days in EBS as most recent backups are likely to be the ones that … Read more

AWS CLI archive ami

I use Amazon’s Daily Backup service which creates Amazon Machine Images from snapshots which I keep for a year in S3 Deep Archive and then automatically delete using a Lifecycle Rule (Daily backups.) However I’ve upgraded the Git server and I want to keep a copy of the old one in a bucket of old … Read more

Install AWS CLI

I’m using pip to install the latest awscli as the version in apt won’t work for the new ‘Deep Archive’ however awscli v2 is now available and should be used instead of the old one: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html pip3 install awscli Now we need to configure the cli by installing authentication from AWS. Log into the AWS account … Read more