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

AWS::Serverless::Api resource throws Obsolete DependsOn #1534

Closed
ben-elsen opened this issue May 17, 2020 · 2 comments
Closed

AWS::Serverless::Api resource throws Obsolete DependsOn #1534

ben-elsen opened this issue May 17, 2020 · 2 comments

Comments

@ben-elsen
Copy link

ben-elsen commented May 17, 2020

cfn-lint version: 0.31.1

Description of issue.
I have a AWS::Serverless::Api resource that is formatted like the documentation (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html & https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-apiusageplan.html#sam-property-api-apiusageplan--examples) and everything deploys well to AWS but the linter gives an error:

[Serverless IDE] W3005: Obsolete DependsOn on resource (ApiGateway), dependency already enforced by a "Ref" at Resources/ApiGatewayUsagePlan/Properties/ApiStages/0/ApiId/Ref

The template is:

  #############################################################
  # The api config
  ############################################################
  ApiGateway:
    Type: AWS::Serverless::Api
    Properties:
      StageName: !Ref StageName
      Auth:
        ApiKeyRequired: true
        UsagePlan:
          CreateUsagePlan: PER_API
          Description: Usage plan for this API
          Quota:
            Limit: 500
            Period: MONTH
          Throttle:
            BurstLimit: 100
            RateLimit: 50```
@PatMyron
Copy link
Contributor

Thanks for the template and warning message. We've had quite a few recent similar issues with code generated by the AWS::Serverless transform failing rules:
#1265
#1522

Raising an issue in their repository and/or ignoring with something like --ignore-checks W3005 is probably the best advice I have for now unfortunately

@ben-elsen
Copy link
Author

Hi @PatMyron,
Thanks for the advice!

@PatMyron PatMyron changed the title AWS::Serverless::Api resource throws error AWS::Serverless::Api resource throws Obsolete DependsOn Jun 30, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants