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

Bug: Update cfn-lint dependency #7827

Open
scolebrook opened this issue Jan 9, 2025 · 2 comments
Open

Bug: Update cfn-lint dependency #7827

scolebrook opened this issue Jan 9, 2025 · 2 comments
Labels
dependencies Pull requests that update a dependency file type/bug

Comments

@scolebrook
Copy link

Description:

sam validate relies on cfn-lint. SAM currently uses 1.20.1. Current version with up to date CloudFormation schema is 1.22.4. Example use case is adding the new PointInTimeRecoverySpecification.RecoveryPeriodInDays property to a DynamoDB table resource. cfn-lint 1.22.4 validates the template. SAM 1.132.0 doesn't, giving the following error message (generated mostly by the out of date cfn-lint):

[[E3002: Resource properties are invalid] (Additional properties are not allowed ('RecoveryPeriodInDays' was unexpected)) matched 151]
Error: Linting failed. At least one linting rule was matched to the provided template.

Steps to reproduce:

Add the following resource to an otherwise valid SAM template:

  table:
    Type: "AWS::DynamoDB::Table"
    Properties:
      TableName: "MyTable"
      AttributeDefinitions:
        - AttributeName: "pk"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "pk"
          KeyType: "HASH"
      PointInTimeRecoverySpecification:
        PointInTimeRecoveryEnabled: true
        RecoveryPeriodInDays: 7

Run sam validate.

Observed result:

Error message.

Expected result:

Passing validation.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

{
  "version": "1.132.0",
  "system": {
    "python": "3.11.10",
    "os": "macOS-15.2-x86_64-i386-64bit"
  },
  "additional_dependencies": {
    "docker_engine": "Not available",
    "aws_cdk": "2.26.0 (build a409d63)",
    "terraform": "1.10.3"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}
@scolebrook scolebrook added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jan 9, 2025
@roger-zhangg
Copy link
Member

Hi, thanks for reporting, we will release a new sam-cli version with updated cfn-lint next week

@roger-zhangg roger-zhangg added type/bug dependencies Pull requests that update a dependency file and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jan 24, 2025
@rogalski
Copy link

Same applies to newly releases SnapStart for Python/Dotnet:

[[E2530: SnapStart supports the configured runtime] ('python3.12' is not supported for 'SnapStart' enabled functions) ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file type/bug
Projects
None yet
Development

No branches or pull requests

3 participants