Converting existing, manually created Lambda with triggers and Function URL to SAM

0

Hello, I have a Java lambda function that I have been deploying manually with a .jar that has a function url and two triggers from dynamodb streams (streams were also created manually). This lambda is already running in our "production" environment.

I'm trying to set up deployment using SAM without causing too many issues since the lambda is actively being used. I was able to create a CloudFormation stack with just the lambda by importing the lambda and it seems to have kept all triggers and the function URL, however, I did not define any of those things in the CloudFormation template I used for import. I have a SAM template set up, but I'm now curious if I need to include the events or function url definition - if I just deploy via SAM as I am just trying to update the code of the lambda, will the function url remain enabled and the same? Will the triggers remain? Or will those connections be severed? I'd just try it and see what happens, but the function url for the lambda is actively being used, I don't want to disable or cycle the url on accident.

已提問 2 年前檢視次數 353 次
1 個回答
0

Can I suggest you repeat your manual deployment into two new Dev and Test environments, so you have the ability to experiment in Dev, then do a dry-run in Test, before then making identical changes in Prod.

Yes I think you need to include your events and function url definition in the SAM template, because if CloudFormation is triggered to update your Lambda function it may modify it as per your template.

專家
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南