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

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
主站蜘蛛池模板: 永靖县| 体育| 仁布县| 卓尼县| 五原县| 类乌齐县| 金昌市| 介休市| 承德县| 惠东县| 彰武县| 临汾市| 蚌埠市| 县级市| 白沙| 广平县| 广丰县| 三台县| 广汉市| 宜君县| 永年县| 杭锦后旗| 若尔盖县| 哈巴河县| 德兴市| 清涧县| 定边县| 普兰县| 腾冲县| 普定县| 福鼎市| 崇明县| 河间市| 白水县| 库车县| 河间市| 玉门市| 麻江县| 云霄县| 科技| 勃利县|