# SNS Fanout & Filtering Calculator AI Agent Connect

> Calculate AWS SNS fanout, throughput, and filter policy complexity.

## Overview
- **Category:** infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_98iyOjkmR9KFosPOlbUvQjLdKTQJiBwin5MQvtui/ai-agent-connect
- **Tags:** sns, aws, fanout, throughput, filtering

## Description

This MCP server provides deterministic calculations for AWS SNS architectures. Use `calculate_fanout_and_limits` to verify if message payloads and attribute counts stay within the 256 KB limit. Use `evaluate_policy_and_throughput` to determine maximum messages per second for FIFO or Standard topics and validate filter policy nesting depth. Use `analyze_delivery_resilience` to calculate SQS visibility timeouts and exponential backoff retry delays.

## Tools

### calculate_fanout_and_limits
Calculate total fanout and verify if the message payload adheres to AWS physical constraints

### evaluate_policy_and_throughput
Assess if the message filtering logic and topic type are compatible with the required scale

### analyze_delivery_resilience
Calculate the impact of SQS settings on message availability and retry behavior

## Prompt Examples

**Prompt:** 
```
Calculate the fanout for a message with 10 SQS subscribers and 5 Lambda subscribers, with a 150 KB message size and 5 attributes.
```

**Response:** 
```
The total fanout is 15 delivery attempts, and the payload is valid.
```

**Prompt:** 
```
What is the max throughput for a FIFO topic with batching enabled?
```

**Response:** 
```
The maximum throughput for a FIFO topic with batching enabled is 3000 messages per second.
```

**Prompt:** 
```
If my SQS visibility timeout is 30 seconds, what is the effective retention for the first retry attempt?
```

**Response:** 
```
The effective retention is 30 seconds.
```

## Frequently Asked Questions

**How do I check if my SNS message is too large?**
You can use the `calculate_fanout_and_limits` tool. It checks if the `messageSizeKb` and `attributeCount` combined stay within the AWS 256 KB limit.

**What is the throughput difference between FIFO and Standard topics?**
Use `evaluate_policy_and_throughput` to find out. FIFO topics support 300 msg/s or 3000 msg/s with batching, while Standard topics are designed for much higher, throttled throughput.

**How does SNS handle retries?**
SNS uses an immediate retry followed by exponential backoff. You can calculate the specific delay using the `analyze_delivery_resilience` tool.
