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

Question: Can't deploy “AWS::Notifications::*” Resource? #7911

Open
DogFortune opened this issue Mar 3, 2025 · 4 comments
Open

Question: Can't deploy “AWS::Notifications::*” Resource? #7911

DogFortune opened this issue Mar 3, 2025 · 4 comments
Labels
stage/bug-repro The issue/bug needs to be reproduced stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Comments

@DogFortune
Copy link

Hi.

I would like to deploy an “AWS::Notifications::*” resource in SAM.
But I get the following error and cannot deploy it.

[[E3006: Validate the CloudFormation resource type] (Resource type 'AWS::Notifications::NotificationConfiguration' does not exist in 'us-east-1') matched 282,
[E3006: Validate the CloudFormation resource type] (Resource type 'AWS::Notifications::EventRule' does not exist in 'us-east-1') matched 288,
[E3006: Validate the CloudFormation resource type] (Resource type 'AWS::Notifications::ChannelAssociation' does not exist in 'us-east-1') matched 307,
[E3006: Validate the CloudFormation resource type] (Resource type 'AWS::NotificationsContacts::EmailContact' does not exist in 'us-east-1') matched 312]
Error: Linting failed. At least one linting rule was matched to the provided template.

SAM does not support the “AWS::Notifications::*” resource?

Environment

  • SAM CLI, version 1.134.0
@DogFortune DogFortune added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Mar 3, 2025
@seshubaws
Copy link
Contributor

Hello @DogFortune, thank you for reaching out! Could you please post your SAM template here so we can attempt to reproduce this issue?

@seshubaws seshubaws added the stage/bug-repro The issue/bug needs to be reproduced label Mar 3, 2025
@DogFortune
Copy link
Author

@seshubaws OK. SAM template attached.

AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: UserNotification
Resources:
  Configuration1:
    Type: AWS::Notifications::NotificationConfiguration
    Properties:
      Name: hogenotification1
      Description: hogehoge
      AggregationDuration: SHORT
  Rule1:
    Type: AWS::Notifications::EventRule
    Properties:
      NotificationConfigurationArn: !Ref Configuration1
      Source: aws.cloudwatch
      EventPattern: |
        {
          "detail": {
            "state": {
              "value": [
                "ALARM"
              ]
            }
          }
        }
      EventType: "CloudWatch Alarm State Change"
      Regions:
        - ap-northeast-1
  Channel1:
    Type: AWS::Notifications::ChannelAssociation
    Properties:
      Arn: !Ref Email1
      NotificationConfigurationArn: !Ref Configuration1
  Email1:
    Type: AWS::NotificationsContacts::EmailContact
    Properties:
      Name: Notify
      EmailAddress: example.com

Running sam validate should reproduce this.

@valerena
Copy link
Contributor

valerena commented Mar 5, 2025

Did you have the problem only running sam validate, or does sam deploy also have the same error?

It's likely related to the fact that SAM CLI has currently an old version of cfn-lint, which is used by sam validate #7895 . We recently upgraded that dependency, but we haven't released the new version with those changes yet.

Normally you need to provide extra parameter --lint to use cfn-lint, but many projects by default have lint = true configured in samconfig.yaml

I'll post here when a new version gets released

@DogFortune
Copy link
Author

Did you have the problem only running sam validate, or does sam deploy also have the same error?

Occurs when sam validate is running.

I'll post here when a new version gets released

OK! I am waiting for a new version to be released.

Thanks for checking it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/bug-repro The issue/bug needs to be reproduced stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

No branches or pull requests

3 participants