The AWS CLI
CLI stands for command-line interface, which provides some tools and libraries to facilitate accessing AWS services. As such, the AWS CLI has some APIs to use AWS services. The AWS CLI is one of the most common tools used when working with AWS. It has different methods to access AWS services. We are going to install awscli
to access AWS services. In this section, we will install awscli
and, after that, configure an EC2 machine to upload a file from EC2:
- In order to access S3 from
awscli
, we need to create an IAM role to be attached to EC2. Connect to the AWS Management Console, typeIAM
, and then click IAM:
Figure 4.36 – IAM in the console
- Click Roles on the left panel and then click Create role:
Figure 4.37 – Create role
- Select EC2 as a common use case and click Next:
Figure 4.38 – Select a service
- Now, we need to give the required...