7

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?

Drakken Saer
  • 859
  • 2
  • 10
  • 29

1 Answers1

0

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.

Reference: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-invoke.html

matheusopedro
  • 128
  • 1
  • 13