title: How to get Subscription ARN from Amazon SNS in order to unsubscribe from it
body: <p>I'm using Amazon SNS and Cognito to subscribe and unsubscribe from topics certain devices.</p>
  
  <p>*Note that there may be a similar topic, but Amazon no longer use that clases.</p>
  
  <p>So far, so good...</p>
  
  <p>But in order to unsubscribe a device from a topic, I need to pass the Subscription ARN which I'm unable to figure out within the App.</p>
  
  <p>The Subscription ARN is made by the topic ARN (that I know) and an alphanumeric string that is generated by Amazon (that I don't know).</p>
  
  <p>This code:</p>
  
  <pre><code>AWSSNSUnsubscribeInput *input = [[AWSSNSUnsubscribeInput alloc] init];
  input.subscriptionArn = @"arn:aws:sns:XXXXXXXX-YYYYYYYYYYYYYYYYYYYY-ZZZZZZZZZZZZZ";
  
  NSLog(@"Input subscription: %@", input.subscriptionArn);
  
  [sns unsubscribe: input completionHandler:^(NSError * _Nullable error) {
      if (error) {
          NSLog(@"Error occurred: [%ld]", error.code);
      }
      else {
          NSLog(@"Success");
      }
  }];
  </code></pre>
  
  <p>It works fine if I get the Subscription ARN from the AWS console, but down in the App I have no possible way of querying or generate that field.</p>
  
  <p>I guess there's a walk-around, but so far I was unable to get any successful approach. How should I proceed to get this done?</p>
  
  <p>Thank you all very much.</p>