If you have not already set up an Amazon Web Services (AWS) account, you must do so before following the procedures below. To set up an Amazon AWS account, please visit http://aws.amazon.com.
Using AWS CLI at Hosting.com
To access an AWS account from your Hosting.com account, you set up a virtual environment for Python, and then install and configure the awscli package. Before you do this, however, you must log in to the AWS console and create a user group and a user. When you do this, AWS generates the user’s Access key and Secret key. You must provide both of these keys during the awscli package configuration process.Installing and configuring the awscli package
The awscli Python package enables you to access an AWS account from the command line. To install and configure the awscli package on your hosting.com account, follow these steps:- Log in to your account using SSH.
-
To create the Python virtual environment, type the following commands at the command prompt:
-
To activate the virtual environment, type the following command:
📘 Note The command prompt changes to (amazon)username@example.com to indicate that you are running within a virtual environment.
-
To install the awscli package, type the following command:
-
To make the awscli program executable, type the following command:
-
To configure the awscli package for access to your AWS account, type the following command:
- At the AWS Access Key ID prompt, type the AWS user’s Access key and then press Enter.
- At the AWS Secret Access Key prompt, type the AWS user’s Secret key and then press Enter.
- At the Default region name prompt, press Enter.
-
At the Default output format prompt, press Enter. The AWS CLI is now configured for your account.
👍 Tip To view a list of commands available with the AWS CLI, type the following command at the command prompt: