I am trying to use a compiled CloudFormation file directly with SAM Local. I cannot find a way to do this, has anyone achieved this successfully?
SAM Local: Can you use a CloudFormation file directly instead of SAM Template?
Asked Answered
Well, assuming you want to test locally a lambda you're provisionin, you can use this command:
sam local invoke -t path-to-compiled-stack-sam-template.yaml
By default, sam local invoke
tries to locate a template file built using the sam build command, located in the .aws-sam subfolder, and named template.yaml or template.yml. If it doens't succeed, it will look for a template.yaml in your current directory.
This should work.
Please let us know if you're case is any more specific than this.
© 2022 - 2024 — McMap. All rights reserved.