public synchronized void confirmSubscription(SnsRequest snsRequest) {
List<SnsTopic> snsTopics = snsTopicRepository.findByTopicArn(snsRequest.getTopicArn());
for (SnsTopic snsTopic : snsTopics) {
MDCBuilder.buildMdcContext(snsTopic.getCredential());
if (!snsTopic.isConfirmed()) {
AmazonSNSClient amazonSNSClient = awsStackUtil.createSnsClient(snsTopic.getRegion(), snsTopic.getCredential());
ConfirmSubscriptionResult result = amazonSNSClient.confirmSubscription(snsTopic.getTopicArn(), snsRequest.getToken());
LOGGER.info("Subscription to Amazon SNS topic confirmed. [topic ARN: '{}', subscription ARN: '{}', credential: '{}']",
snsRequest.getTopicArn(), result.getSubscriptionArn(), snsTopic.getCredential().getId());
snsTopic.setConfirmed(true);
snsTopicRepository.save(snsTopic);
notifyRequestedStacks(snsTopic);