By using AWS re:Post, you agree to the Terms of Use

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.

1 Answers
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.

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions