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

Prerequisites 

First of all, you need an AWS account. If you don't have an account, you can sign up for an account at https://aws.amazon.com/:

While clicking on the Create a Free Account and then following the onscreen instructions will give you 12 months' free access to several services, you will still need to provide credit or debit card details and it is possible that you could incur costs.

For more information on the AWS free tier, please see https://aws.amazon.com/free/. This page lets you know which instance sizes and services are covered by the 12 months of free service, as well as letting you know about non-expiring offers on other services, which include AWS Lambda.

Once you have your AWS account, you should create a user using the AWS Identity and Access Management (IAM) service. This user can have administrator privileges and you should use that user to access both the AWS Console and the API.

For more details on creating an IAM user, see the following pages:

Using your AWS root account to launch services and access the API is not recommended; if the credentials fall into the wrong hands you can lose all access to your account. Using an IAM rather than your root account, which you should also lock down using multi-factor authentication, means that you will always have access to your AWS account.

The final prerequisite is that you need access to the AWS command-line client, where I will be using macOS, but the client is also available for Linux and Windows. For information on how to install and configure the AWS command-line client, please see:

When configuring the AWS CLI, make sure you configure the default region as the one you will be accessing in the AWS web console, as there is nothing more confusing than running a command using the CLI and then not seeing the results in the web console.

Once installed, you can test that you can access AWS Lambda from the command-line client by running:

$ aws lambda list-functions

This should return an empty list of functions like the one shown in the following screenshot:

Now that we have an account set up, created, and logged in using a non-root user, and we have the AWS CLI installed and configured, we can look at launching our first serverless function.

主站蜘蛛池模板: 子长县| 邻水| 潼关县| 恩施市| 邹城市| 泗水县| 外汇| 上林县| 浠水县| 扬州市| 同仁县| 莎车县| 金堂县| 涟源市| 波密县| 阳朔县| 乌鲁木齐县| 平凉市| 西华县| 阿荣旗| 永寿县| 呼图壁县| 江源县| 北安市| 饶平县| 筠连县| 兴城市| 来安县| 富阳市| 九江县| 合川市| 来宾市| 宕昌县| 策勒县| 楚雄市| 贵阳市| 鲁甸县| 荆州市| 屯门区| 德庆县| 景德镇市|