19

I'm trying to setup an AWS Lambda function that gets triggered when a CloudWatch alarm sends a message to an SNS topic. I'm following along in this guide:

https://medium.com/analytics-vidhya/generate-slack-notifications-for-aws-cloudwatch-alarms-e46b68540133

I'm stuck at step 6 at the point where it says to add the trigger to the function. I select my SNS topic as the trigger but when I hit Add it gives me the following error:

An error occurred when creating the trigger: Invalid parameter: Invalid protocol type: lambda (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 343350ee-b514-5c7c-8180-08fe5fd643ec; Proxy: null)

enter image description here

Does anybody know what that error means and what I can do about it?

Thanks

gib65
  • 1,709
  • 3
  • 24
  • 58
  • 15
    I'm not sure Lambda supports integration with SNS FIFO topics yet. It took them a while to add support for SQS FIFO queues when that feature was released. Looking at the SNS FIFO announcement, it looks like they are doing SNS FIFO -> SQS FIFO -> Lambda. https://aws.amazon.com/blogs/aws/introducing-amazon-sns-fifo-first-in-first-out-pub-sub-messaging/ – Mark B Oct 26 '20 at 16:15
  • 2
    @MarkB is correct. – hephalump Oct 26 '20 at 16:32
  • 1
    Thanks both! I changed the SNS topic to standard and it worked. – gib65 Oct 26 '20 at 17:47
  • Doesn't support email with FIFO either apparently. – A Simple Programmer Apr 04 '23 at 15:52

2 Answers2

34

I ran into this problem recently...

As of now, Lambda only supports Standard SNS topics.

You will need to change your SNS topic from FIFO to Standard.

DanielWsk
  • 349
  • 3
  • 5
2

Thanks DanielWsk, looks like fifo only works with SQS. It was there but didn't see it.

enter image description here

Ameer Ul Islam
  • 380
  • 3
  • 5