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.
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
- asked 3 months ago
- asked 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- EXPERTpublished a year ago