Adding Encryption to Serverless SNS Topic

Hello,

I have serverless.yml file where I create a SNS topic like:

events:

  • sns:
    topicName: ‘my-test-topic’

I am trying to add server-side encryption to this topic. I’ve tried using the following:

events:

  • sns:
    topicName: ‘my-test-topic’
    kmsMasterKeyId: ‘test-kms-key’

I’m getting a “unrecognized property kmsMasterKeyId” message

I know there is a way to add this kmsMasterKeyId property if the SNS topic is created under the resources section of the serverless.yml, but is there any way to do this when the sns topic is created in the events section? Any help on this would be greatly appreciated.

But when I try sending messages from SNS to SQS using the default KMS aws/sqs, it then fails with an error KMS.AccessDeniedException.

It’s very odd. Sometimes it’s like the message receiver (SQS) needs to have access; other times it’s like the message sender needs to have access.
Kodi nox