Mohamed Wali
Mohamed Wali

Reputation: 185

Retrieve the encryption state of AWS SNS with PowerShell

I've investigated all AWS SNS PowerShell Cmdlets that would retrieve whether an SNS topic is encrypted or not, but I can see any of the attributes retrieved from

Get-SNSTopicAttribute

relates to the encryption configuration of the topic. Is there a workaround for that?

Upvotes: 0

Views: 164

Answers (1)

Amit Baranes
Amit Baranes

Reputation: 8152

The workaround is to check if the response includes KmsMasterKeyId property. Since, You must enter a valid CMK ARN.

For instance:

enter image description here

Note that when the SNS is not encrypted the KmsMasterKeyId property is missing.

enter image description here

Upvotes: 1

Related Questions