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::SNS::Subscription.Protocol AllowedValues expansion (firehose) #1924

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Conversation

evilneuro
Copy link
Contributor

@evilneuro evilneuro commented Mar 1, 2021

Issue #, if available:

Description of changes: When creating a resource of type AWS::SNS::Subscription, using "Protocol": "firehose", cfn-lint returns "E3030: You must specify a valid value for Protocol (firehose). Valid values are ["application", "email-json", "email", "http", "https", "lambda", "sms", "sqs"]". To fix this, the protocol "firehose" must be added to the list of valid values for an SNS Subscription resource.

Problem: SNS was recently updated to support delivering messages from SNS topics to Kinesis Data Firehose delivery streams. The CloudFormation documentation for the AWS::SNS::Subscription resource points at the SNS API documentation for the Subscribe action for a list of valid SNS subscription protocols. This list has been updated to include the firehose protocol for a delivery stream, however cfn-lint has not been updated; it fails to validate a template if the firehose protocol is used, but the template will deploy successfully when executed in CloudFormation.

Example:

"MyKinesisFireHoseSNSSub": {
    "Type": "AWS::SNS::Subscription",
    "Properties": {
        "TopicArn": { "Fn::GetAtt": ["MySNSTopic", "Arn"] },
        "SubscriptionRoleArn": { "Fn::GetAtt": [ "MySNSSubIAMRole", "Arn" ] },
        "Endpoint": {
            "Fn::GetAtt": ["MyKinesisFirehoseDeliveryStream", "Arn"]
        },
        "Protocol": "firehose",
        "RawMessageDelivery": true
    }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong kddejong merged commit 8580cae into aws-cloudformation:master Mar 4, 2021
@evilneuro
Copy link
Contributor Author

Thanks, Kevin!

@PatMyron PatMyron changed the title Add Kinesis Data Firehose to permitted SNS subscription protocols AWS::SNS::Subscription.Protocol AllowedValues expansion (firehose) Mar 4, 2021
This was referenced Mar 10, 2021
This was referenced Mar 12, 2021
@PatMyron PatMyron added the good first issue Good for newcomers label Apr 11, 2021
direvus pushed a commit to direvus/cfn-python-lint that referenced this pull request Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants