Getting error while creating API using swagger file in cloudformtion template (AWS::Serverless::Api)
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
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?
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
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.
Thanks @normj . I will keep checking the issue for the updates.
Thanks, Aparna
Hi @normj Wondering if any update regarding this.
Thanks, Aparna
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.
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.