SNS fifo topic Support for Serverless

Hi,

I’m trying to create a SNS Fifo Queue via Serverless however I’m running into this error:

Serverless Error

Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.

My understanding is that SNS recently started supporting fifo which requires a .fifo suffix
It appears that this goes against some validation in serverless SNS naming.

Wondering if I’m creating my fifo topic incorrectly or if this isn’t support yet?

Hello @rosenjd4 - as far as I’m concerned it’s currently not supported at schema level in framework - you might want to report that as an issue or feature request :+1:

I am relatively new here but looks like CloudFormation does support fifo topics:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html

So, if that is supported, is it possible to deploy fifo topics by specifying them as resources using CloudFormation syntax? If I am reading this right, that should “just work”:

I am looking to deploy a SNS fifo topic stack so I will try this. Am I misreading the capabilities?

1 Like

Hi Ziggyrama,
did you find out how to configure serverless(.ts/.yml) to create a sns fifo resource?

I ended up abandoning fifo topics for my deployments but that being said, since CloudFormation supports them, you can probably just set the FifoTopic attribute in the topic resource definition and that should work. So, something like this:

resources:
  Resources:
    MyTopic:
      Type: AWS::SNS::Topic
      Properties:
        TopicName: my-topic
        FifoTopic: true
1 Like