- AWS CLI
- AWS Account
- IAM User with Administrator Access
- Login to your AWS account and go to the EC2 Dashboard. Link
- Click on Launch Instance.
- Give a name to your instance.
- Select an Amazon Machine Image (AMI). For this experiment, we will use the Amazon Linux 2 AMI (HVM), SSD Volume Type.
- Select an instance type. For this experiment, we will use the t2.micro instance type.
- Create a new key pair and download it. This will be used to connect to the instance.
- Click on Launch Instance.
- Success! Your instance is now launched.
- Click on View Instances to view your instance.
- Open your terminal and go to the directory where you downloaded the key pair.
- Change the permissions of the key pair file using the following command:
chmod 400 <key-pair-name>.pem
- Connect to the instance using the following command:
ssh -i <key-pair-name>.pem ec2-user@<public-ip-address>
- You are now connected to the instance.
- Go to the S3 Dashboard. Link
- Click on Create Bucket.
- Give a name to your bucket.
- Select a region. For this experiment, we will use the US East (N. Virginia) region.
- Scroll down and Click on Create bucket.
- Success! Your bucket is now created.
- Click on the bucket you just created.
- Click on Upload.
- Click on Add files.
- Select a file and click on Next.
- After selecting the file, click on Upload.
- Go to the S3 Dashboard. Link
- Click on the bucket you just created.
- Click on Management.
- Click on Add lifecycle rule.
- Give a name to your lifecycle rule. For this experiment, we will use the name DevOps Ex-3.
- Enter the prefix of the object. For this experiment, we will use the prefix Ex-3.
- Add object tags. For this experiment, we will use the tag Ex-3.
- Select the lifecycle rule action. For this experiment, we will use the action Transition to Standard-IA storage class after 30 days.
- Click on Create Rules.
- Success! Your lifecycle rule is now created.
- Go to the EC2 Dashboard. Link
- Click on Instances.
- Select the instance you just created.
- Click on Actions.
- Click on Instance State.
- Click on Stop. To avoid burning all your daddy's money