# Replace AWS SQS & SNS with KubeMQ (/deploy/scenarios/replace/replace-sqs-sns)



<Callout type="info">
  You need a license key to start KubeMQ — it's free, about 2-3 minutes (it includes creating a free account). 

  [Get one](/deploy/license-key)

  . Step 1 below starts the broker with the connector enabled.
</Callout>

Your AWS SDK (or an existing LocalStack-style setup) already talks SQS and SNS over
HTTP — point its **endpoint** at KubeMQ and everything else — SDK, code, request
shapes — stays the same.

**Drop-in level:** endpoint-only ([legend](/deploy/scenarios/replace#drop-in-levels))

## 1 · Enable the connector [#1--enable-the-connector]

The AWS connector is disabled by default — enable it and publish its port:

<RunKubeMQ env="{ CONNECTORS_AWS_ENABLE: 'true' }" ports="[4566, 50000]" />

Port `4566` is the AWS SDK `endpoint_url` / LocalStack-style convention
(`Connectors.Aws.Port` on the client side) — not a fixed broker listener, so it
doesn't appear in KubeMQ's shared port tables. That's not a typo.

## 2 · Point your client at KubeMQ [#2--point-your-client-at-kubemq]

```bash title="Before — real AWS"
# No endpoint override; the SDK talks to the regional AWS endpoint.
```

```bash title="After — KubeMQ"
export AWS_ENDPOINT_URL_SQS=http://localhost:4566
export AWS_ENDPOINT_URL_SNS=http://localhost:4566
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
export AWS_DEFAULT_REGION=us-east-1    # any value works; not enforced
```

Or override the endpoint per-client in boto3:

```python
import boto3

sqs = boto3.client(
    "sqs",
    endpoint_url="http://localhost:4566",
    region_name="us-east-1",
    aws_access_key_id="test",
    aws_secret_access_key="test",
)
```

Dummy credentials are still required — the connector's accept-any mode doesn't
verify the signature value, but the SDK must still form a syntactically valid SigV4
request.

## 3 · Smoke test [#3--smoke-test]

Adapted from the AWS connector's
[verification smoke test](/connectors/aws/reference/migration-from-aws#verification-smoke-test):

```python
import boto3

sqs = boto3.client(
    "sqs",
    endpoint_url="http://localhost:4566",
    region_name="us-east-1",
    aws_access_key_id="test",
    aws_secret_access_key="test",
)

queue_url = sqs.create_queue(QueueName="smoke-test")["QueueUrl"]
sqs.send_message(QueueUrl=queue_url, MessageBody="smoke-test-payload")

resp = sqs.receive_message(QueueUrl=queue_url, WaitTimeSeconds=5)
msg = resp["Messages"][0]
assert msg["Body"] == "smoke-test-payload"
sqs.delete_message(QueueUrl=queue_url, ReceiptHandle=msg["ReceiptHandle"])
print("Smoke test PASSED.")
```

You should see:

```text
Smoke test PASSED.
```

## What carries over — and what doesn't [#what-carries-over--and-what-doesnt]

Your AWS SDK/CLI, code, and the SQS/SNS wire protocol carry over unchanged — only
the endpoint moves. Existing queues/topics are **not** auto-migrated (recreate them
against KubeMQ) and a few AWS features (SNS email/SMS/Lambda subscriptions,
connector-side TLS) aren't supported — see the deviations list below.

<Cards>
  <Card title="AWS connector getting started" href="/connectors/aws/tutorials/getting-started" description="The full round-trip walkthrough — SQS, SNS fan-out, and every language SDK." />

  <Card title="Migrating from AWS SQS/SNS" href="/connectors/aws/reference/migration-from-aws" description="The full cutover guide — compatibility matrix, deviations, and security." />
</Cards>

## Didn't work? [#didnt-work]

<Callout type="warn">
  * **Connection refused** — the connector is opt-in; confirm `CONNECTORS_AWS_ENABLE=true`
    was set when the container started.
  * **"missing credentials" from the SDK** — accept-any mode still requires a
    syntactically valid SigV4 request; set dummy `AWS_ACCESS_KEY_ID` /
    `AWS_SECRET_ACCESS_KEY` / region even though their values aren't checked.
  * **Wrong port** — the AWS connector listens on `4566`, not a broker port you may
    already have mapped (gRPC `50000`, REST `9090`, dashboard `8080`).
</Callout>
