官术网_书友最值得收藏!

Setting up AWS CLI

To upload our work directly to AWS, we can use the AWS CLI. This allows us to manage our AWS services from the command line and create scripts to automate common tasks. For us, the most important CLI commands are the ones that allow us to create and update Lambdas. With automated scripts we now have the ability to quickly and easily create and deploy Lambdas, fixing the first of the local editing limitations.

To use the AWS CLI, we first need to set it up. You can install it by typing npm install -g aws-cli into your terminal.

Now we need to set up a user for our CLI to log in as. Log in to your AWS Console and navigate to or search for IAM. Click Add user so we can set up a user for our CLI. You're asked to give the user a name, so choose something like cli-user so that it is easily identifiable. Select Programmatic access, which will allow us to act as the user remotely, and click Next: Permissions.

In the Permissions screen, choose to Attach existing policies directly and select AdministratorAccess. This will let you do whatever you want through your CLI. You can set stricter policies on this user if you want, or if you are giving another person access to your account.

There’s another screen before you end up being shown your access keys. Copy your access keys and open a terminal. Run the command aws configurewhich will ask you for four things:

AWS Access Key ID [None]: "Your Access Key ID
"AWS Secret Access Key [None]: "Your Secret Access Key"
Default region name [eu-west-1]:
Default output format [json]:

The first two are found on the last page of the user creation. The third must be the region you chose earlier (eu-west-1 or us-east-1), and the last one can be left as default.

主站蜘蛛池模板: 宜春市| 丰镇市| 嘉义县| 嘉荫县| 繁峙县| 和田市| 福泉市| 祁门县| 通河县| 共和县| 什邡市| 蕲春县| 枝江市| 菏泽市| 称多县| 庆云县| 芷江| 阳原县| 罗定市| 博乐市| 松溪县| 二连浩特市| 会昌县| 泾阳县| 涟水县| 嘉义市| 富源县| 凌源市| 武平县| 金乡县| 呼图壁县| 无锡市| 建德市| 电白县| 马尔康县| 绥化市| 广州市| 璧山县| 西昌市| 金阳县| 高安市|