SSH to your Amazon Linux 2 EC2 instance, and follow the steps: $ sudo yum update -y $ sudo amazon-linux-extras install docker $ sudo systemctl enable docker $ sudo systemctl start docker $ sudo usermod -aG docker ec2-user # Optional,… Read More
How to make an S3 bucket public?
The first thing is to make sure the “Public Access Block” are disabled. In the AWS console, go to your bucket, then “Permissions”, then “Block public access”. Then set the bucket policy to this: { "Version": "2008-10-17", "Statement": [ {… Read More
How should I tag my AWS resources?
The primary purposes of tags are: To provide human-readable information about the resources As part of automation Filter resources Here are some use cases related to providing human-readable information: Allow a human to semantically understand what a resource is; eg:… Read More
What is the VPC flow log format?
When you enable VPC flow logs, records will be created in CloudWatch Logs (or S3 if you choose so, but CloudWatch Logs is definitely better for debugging). There will be one log stream per network interface, and the format of… Read More
How to setup MFA on AWS using only the command line?
You obviously need to have the credentials to perform IAM operations (either you have the access key and secret key of a such a user, or you can SSH to an EC2 instance whose role allow that, etc.) Also, this… Read More
How to install the latest version of AWS command line tool on Ubuntu?
Follow the steps: $ sudo apt update $ sudo apt install python python-pip $ sudo pip install awscli This will install a reasonably recent version of awscli, at least more recent than installing directly with `$ sudo apt install awscli`.… Read More
How to install and configure AWS CloudWatch agent on Ubuntu?
I will assume that you want to install the CloudWatch agent on an EC2 instance (as opposed to an on-premise server). I took the example of sending Apache logs to CloudWatch Logs. First, make sure your EC2 instance has an… Read More