Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

s2texperiments/get-topic-subscription-arn

Repository files navigation

#Get Topic Subscription Arn Cloudformation Custom Resource to find SNS topic subscription arn.

Input:

#required
TopicArn: topic arn which should be queried
Endpoint: endpoint as matching criteria

##Output

Arn: Founded subscription arn

Throws error when:

  • no subscription arn will be founded
  • more than one subscription arn will be founded

Permission

Sns

  • SetSubscriptionAttributes

##Example

GetTopicSubscriptionArn: 
  Type: "Custom::GetTopicSubscriptionArn"
  Properties: 
    ServiceToken:
      !Sub |
        arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${LambdaFunctionName}
    TopicArn: Ref(Topic)
    Endpoint: GetAtt(LambdaWhichIsSubscribed,'Arn')
    StackName: 
      Ref: "StackName"      

Limitation

An Endpoint must be unique in the topic subscription list.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published