aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Getting error while creating API using swagger file in cloudformtion template (AWS::Serverless::Api)

Open aparnamane opened this issue 9 years ago • 7 comments

Hi Team,

I am getting following error when using swagger.json file in cloudformation template.

"Failed to create CloudFormation change set: Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Api] is invalid. 'DefinitionUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter."

i am using source in template as below:

"Api": {
       "Type": "AWS::Serverless::Api",
       "Properties": {
         "StageName": "Playground",
         "DefinitionUri": "swagger.json"

AWS service team has confirm this issue is related with the dotnet tool and they suspect this may be an issue with the dotnet sdk or the dotnet lambda tool itself and ask to open the issue with github.

Please reply.

Thanks, Aparna

aparnamane avatar May 10 '17 02:05 aparnamane

Which tool is giving you this error? Can you provide a link to the conversation with the service team? Did you contact the service team through AWS Support or the AWS Forums?

PavelSafronov avatar May 10 '17 16:05 PavelSafronov

Here is the case id: Case ID2182560371 I have contacted with them through AWS Support. Here is the link: https://console.aws.amazon.com/support/home?region=ap-southeast-2#/case/?displayId=2182560371&language=en

Thanks, Aparna

aparnamane avatar May 11 '17 00:05 aparnamane

We don't yet have this feature in the .NET Lambda tools to upload the swagger and auto update the template to location. I'll add that feature to our backlog and leave this issue open to keep track of it.

normj avatar May 12 '17 05:05 normj

Thanks @normj . I will keep checking the issue for the updates.

Thanks, Aparna

aparnamane avatar May 15 '17 00:05 aparnamane

Hi @normj Wondering if any update regarding this.

Thanks, Aparna

aparnamane avatar May 24 '17 01:05 aparnamane

Haven't gotten to this yet. If you have a sample project with a swagger file that I could use that would speed up the work.

normj avatar May 24 '17 18:05 normj

Version 3.1.0 of the Amazon.Lambda.Tools will now upload swagger files when you execute dotnet lambda deploy-serverless command or package-ci

The code is not yet in the Visual Studio toolkit but you can get started with it now from the command line.

normj avatar Oct 13 '18 00:10 normj