[英]How to update existing lambda function using AWS SAM
I have some lambda functions that have been created before moving to AWS SAM.我有一些在迁移到 AWS SAM 之前创建的 lambda 函数。 I would like to update my existing lambda function using AWS SAM.
我想使用 AWS SAM 更新我现有的 lambda function。 What would be the process of referencing the lambda function in AWS SAM.
在 AWS SAM 中引用 lambda function 的过程是什么。 I have a lambda function already created called: hello.
我已经创建了一个 lambda function,名为:你好。
How would I update the lambda function using AWS SAM?如何使用 AWS SAM 更新 lambda function? below is my sam template.yaml file
下面是我的山姆模板。yaml 文件
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: CD Demo Lambda
Resources:
hello:
Type: 'AWS::Serverless::Function'
Properties:
Handler: lambda_function.lambda_handler
Runtime: python3.7
CodeUri: ./s3lambda
FunctionName: hello
MemorySize: 128
Timeout: 03
As AWS SAM uses Cloudformation
for deploying resources.由于AWS SAM使用
Cloudformation
来部署资源。
You need to import the lambdas Importing existing resources into a stack in the cloudformation
stack.您需要将 lambdas 导入现有资源到
cloudformation
堆栈中的堆栈中。
The documentation states that you cannot import resources to AWS SAM Templates.该文档指出您无法将资源导入 AWS SAM 模板。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.