Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIGW Authoriser definition not supported #724

Closed
xiaket opened this Issue Mar 14, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@xiaket
Copy link

xiaket commented Mar 14, 2019

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
@kddejong

This comment has been minimized.

Copy link
Contributor

kddejong commented Mar 14, 2019

This is an error we are getting back from samtranslator

I believe this is the issue that corresponds to the problem you are having.
awslabs/serverless-application-model#756

@xiaket

This comment has been minimized.

Copy link
Author

xiaket commented Mar 14, 2019

Cheers mate, thank you for pointing me to the right direction! Please feel free to close this.

@kddejong

This comment has been minimized.

Copy link
Contributor

kddejong commented 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

@kddejong kddejong added the bug label Mar 30, 2019

@kddejong kddejong self-assigned this Mar 30, 2019

@kddejong

This comment has been minimized.

Copy link
Contributor

kddejong commented Mar 31, 2019

We should have a work around for this in the next release as a result of #778

@kddejong

This comment has been minimized.

Copy link
Contributor

kddejong commented Apr 6, 2019

Released.

@kddejong kddejong closed this Apr 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.