cfn-lint version: cfn-lint 0.16.0
Hi, there!
Thanks for this great tool! It looks really promising! :)
I think this is yet another SAM issue. The following piece of template works in Cloudformation, but cfn-lint think otherwise :P
API:
Type: "AWS::Serverless::Api"
Properties:
StageName: Prod
Auth:
DefaultAuthorizer: LambdaRequestAuth
Authorizers:
LambdaRequestAuth:
FunctionPayloadType: REQUEST
FunctionArn: !Ref AuthoriserArnParameter
Identity:
Headers:
- authorization
ValidationExpression: "Bearer\ .*"
ReauthorizeEvery: 0
The error message is:
2019-03-14 15:18:18,767 - cfnlint - DEBUG - Setting AWS_DEFAULT_REGION to us-east-1
2019-03-14 15:18:18,854 - cfnlint - DEBUG - Completed linting of file: ../../server/template.yaml
E0001 Error transforming template: Resource with id [API] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property
../../server/template.yaml:1:1
This is an error we are getting back from samtranslator
I believe this is the issue that corresponds to the problem you are having.
https://github.com/awslabs/serverless-application-model/issues/756
Cheers mate, thank you for pointing me to the right direction! Please feel free to close this.
I'm going to leave this open for a little bit. We have seen a spike in SAM issues in the last week or two. Since the template deploys I want to see if they can fix this or if we will have to "fix" it. Kind of like what we are talking about for #700
We should have a work around for this in the next release as a result of #778
Released.
Most helpful comment
I'm going to leave this open for a little bit. We have seen a spike in SAM issues in the last week or two. Since the template deploys I want to see if they can fix this or if we will have to "fix" it. Kind of like what we are talking about for #700