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

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.

主站蜘蛛池模板: 昌图县| 修武县| 绍兴市| 连南| 新田县| 同仁县| 商城县| 绥滨县| 汕尾市| 金昌市| 金溪县| 新晃| 嫩江县| 通海县| 南澳县| 白朗县| 永昌县| 叶城县| 赤城县| 磐安县| 醴陵市| 临高县| 桃源县| 凤阳县| 繁峙县| 长武县| 海原县| 丹棱县| 秭归县| 清新县| 商都县| 丁青县| 南充市| 锦州市| 礼泉县| 瑞金市| 故城县| 百色市| 台东市| 望江县| 新化县|