question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

APIGW Authoriser definition not supported

See original GitHub issue

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 😛

  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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
kddejongcommented, Mar 14, 2019

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

1reaction
kddejongcommented, Apr 6, 2019

Released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

APIGW Authoriser definition not supported · Issue #724 - GitHub
I believe this is the issue that corresponds to the problem you are having. aws/serverless-application-model#756 ...
Read more >
x-amazon-apigateway-authorizer object - Amazon API Gateway
Defines a Lambda authorizer or JWT authorizer to be applied for authorization of method invocations in API Gateway. This extension applies to the...
Read more >
AWS API Gateway Custom Authorizer not invoked
Now I have created custom authorizer, which is in turn a call to another lambda. So a request will be validated by authorizer...
Read more >
Solved: Working API Gateway Lambda Request Authorizer
A request authorizer function is defined. A simple API Gateway Endpoint is mapped to a Lambda function. The Api Gateway Resource. While SAM...
Read more >
REST API (API Gateway v1) - Serverless Framework
We highly recommend using the lambda-proxy method if it supports your ... If the Authorizer function does not exist in your service but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found