Update Existing Lambda Function using SAM.

0

we have multiple lambda functions already created manually, now we wanted to move on SAM. rather then creating any new lambda functions from SAM, we wanted to update existing one. is there any way to move those existing lambda function via SAM, so that we can update and manage those existing lambda function via SAM.

2개 답변
1
수락된 답변

As SAM is based on CloudFormation, you can import resources to it.

You'll need to use the CLI for it, as the console doesn't support the import when the template has the Transform section (reference).

Here is more information on how to do the import: Import an existing resource into a stack using the AWS CLI.

Check the overview of the import process.

profile pictureAWS
Eduardo
답변함 2년 전
  • Thanks, I also got to know about this approach but still I have one question, existing lambdas have already connected with API Gateways, Step functions, Cloud watch events as triggers. is there any way to import these all also cloud formation stack?? Like I wanted to move these lambdas with all it's triggers to sam.

1

Try exporting the existing Lambda function's SAM template: Under Actions > Export Function then choose "Download AWS SAM File" to download the function SAM template. I think you should be able to tweak it to your needs

profile pictureAWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인