serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Docs for Api DefinitionUri do not match examples

Open stuartstevenson opened this issue 9 years ago • 1 comments

The docs say that the fields should be

Required S3 URI to the Swagger document describing the API.

Yet the example is of a local file:

DefinitionUri: swagger.yml

Can it be made clear whether the S3 format is enforced or if local files are also accepted, or an example of both provided if both are valid

stuartstevenson avatar Dec 15 '16 11:12 stuartstevenson

  1. Example should be fixed to have s3 path. Valid SAM templates must have S3 URI for CodeUri & DefinitionUri
  2. However if you use aws cloudformation package command (http://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html), you can have local paths in your template. This command will upload the file to S3 and output a template with local paths replaced by S3 URI of uploaded artifacts. You can use this in conjunction with aws cloudformation deploy command or native create-change-set & execute-change-set APIs to deploy your template

sanathkr avatar Dec 15 '16 19:12 sanathkr