Last active
May 2, 2024 13:53
-
-
Save benc-uk/c06ca79ad5b43d8c5e565bce339fd829 to your computer and use it in GitHub Desktop.
Fake and mock SNS messages with VSCode HTTP extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fake SNS messages with VSCode REST Extension | |
# Install this - https://marketplace.visualstudio.com/items?itemName=humao.rest-client | |
@TOPIC_ARN = "arn:aws:sns:us-east-1:286528903076:BenTestTopic" | |
### | |
# Fake SNS message subscription | |
POST http://localhost:8000/sns/subscription | |
x-amz-sns-message-type: SubscriptionConfirmation | |
x-amz-sns-message-id: {{$guid}} | |
x-amz-sns-topic-arn: {{TOPIC_ARN}} | |
{ | |
"SubscribeURL": "https://example.net/", | |
"TopicArn": {{TOPIC_ARN}} | |
} | |
### | |
# Fake SNS message (type = Notification) | |
POST http://localhost:8000/sns/subscription | |
x-amz-sns-message-type: Notification | |
x-amz-sns-message-id: {{$guid}} | |
x-amz-sns-topic-arn: {{TOPIC_ARN}} | |
{ | |
"TopicArn": {{TOPIC_ARN}}, | |
"Message": "Hello from SNS!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment