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

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
主站蜘蛛池模板: 洪湖市| 三门峡市| 丰台区| 修水县| 景宁| 崇信县| 错那县| 新郑市| 大安市| 鄂尔多斯市| 蓝山县| 苏尼特右旗| 财经| 榆中县| 西乌珠穆沁旗| 肇庆市| 牟定县| 杭锦后旗| 奉贤区| 鄱阳县| 华池县| 新巴尔虎左旗| 永川市| 玉田县| 峡江县| 朝阳市| 涟源市| 色达县| 囊谦县| 临西县| 阿勒泰市| 太谷县| 舟山市| 化州市| 崇义县| 河北省| 同仁县| 临洮县| 钦州市| 巴东县| 阿克苏市|