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

Resources

When we create Lambda functions, they might be dependent on many different types of infrastructure resources, such as AWS, DynamoDB or AWS S3, so we can define these resources within the serverless.yml file and deploy them. When we add these resources, they get added to the serverless.yml file, and when they are deployed, they get added to the CloudFormation stack and are executed at serverless deploy. We can look at the following example to see how these resources are defined: 

resources:
Resources:
NewResource:
Type: AWS::S3::Bucket
Properties:
BucketName: my-s3-bucket
You can refer to the following link for more details on resources and to see which resources are available using only AWS Lambda:  https://serverless.com/framework/docs/providers/aws/guide/resources/

Let's look at a simple example of Serverless Framework using AWS Lambda. 
You will need the following prerequisites for this: 

  • A free AWS account needs to be created
  • Nodejs 4.0 and higher must be installed on the local machine
  • AWS CLI can also be installed, but this is optional
主站蜘蛛池模板: 辽阳市| 西盟| 新河县| 牟定县| 六枝特区| 景洪市| 苏尼特左旗| 慈溪市| 子洲县| 福建省| 报价| 南丹县| 临汾市| 增城市| 宁蒗| 南昌县| 海晏县| 河曲县| 万源市| 浮山县| 大丰市| 桐庐县| 乾安县| 常宁市| 双桥区| 陆良县| 平南县| 富宁县| 安溪县| 崇仁县| 苍梧县| 广元市| 田阳县| 徐汇区| 呼玛县| 溧阳市| 温宿县| 忻城县| 龙江县| 右玉县| 屯门区|