Skip to content
Back to main site

Your first request

Send a message through SQS on the emulator: create a queue, send example.net to it, receive the message and delete it, then delete the queue. Each step shows the output to expect. The steps were checked against Vera 1.2.2 on 8 November 2026.

  • A running emulator. Start it as in Get started. This SQS walkthrough uses the Free plan; no license key is required.
  • AWS CLI 2.31.35 (official bundled distribution) and Python 3. The example uses python3 to read the receipt handle from the response. aws --version shows which CLI you have; for installing it, see AWS’s installation instructions.
  • A terminal of its own and an empty scratch directory. The setup below changes environment variables in that terminal and writes a config file to the directory.
  • Dummy credentials. Requests are signed with the dummy keys set below. Real AWS credentials aren’t needed.

Run this in the new terminal, from the scratch directory. It sets VERA_ENDPOINT to AWS’s address on your machine, as published in Get started, and gives the shell dummy credentials. It keeps the CLI from finding real ones in a profile, a credentials file, instance metadata or the environment, and gives it a config file of its own, vera-aws-config, so your own AWS profile isn’t touched. The config sets the region, JSON output, base64 for binary values in JSON input, and path-style S3 addressing.

Terminal window
export VERA_ENDPOINT="http://localhost:5003"
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test
export AWS_REGION=us-east-1 AWS_DEFAULT_REGION=us-east-1
export AWS_SHARED_CREDENTIALS_FILE=/dev/null
export AWS_EC2_METADATA_DISABLED=true
export AWS_PAGER="" AWS_CLI_AUTO_PROMPT=off
unset AWS_PROFILE AWS_DEFAULT_PROFILE
unset AWS_SESSION_TOKEN AWS_SECURITY_TOKEN
unset AWS_WEB_IDENTITY_TOKEN_FILE AWS_ROLE_ARN AWS_ROLE_SESSION_NAME
unset AWS_CONTAINER_CREDENTIALS_FULL_URI
unset AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
cat > vera-aws-config <<'EOF'
[default]
region = us-east-1
output = json
cli_binary_format = base64
s3 =
addressing_style = path
EOF
export AWS_CONFIG_FILE="$PWD/vera-aws-config"

Every command below passes VERA_ENDPOINT with --endpoint-url. Check the setup by asking STS who you are. The account is the one configured on your instance.

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" sts get-caller-identity
Output
{
"UserId": "AIDACKCEVSQ6C2EXAMPLE",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/emulator"
}

Create the queue, and keep its URL in QUEUE_URL for the next steps:

Terminal window
QUEUE_URL=$(aws --endpoint-url "$VERA_ENDPOINT" sqs create-queue \
--queue-name vera-docs-queue \
--attributes '{"VisibilityTimeout": "30", "MessageRetentionPeriod": "60"}' \
--query QueueUrl --output text)
echo "$QUEUE_URL"

The URL looks like AWS’s, with your instance’s account in it, but it names the queue: requests still go to VERA_ENDPOINT.

Output
https://sqs.us-east-1.amazonaws.com/123456789012/vera-docs-queue
Terminal window
aws --endpoint-url "$VERA_ENDPOINT" sqs send-message \
--queue-url "$QUEUE_URL" --message-body example.net

MD5OfMessageBody is the MD5 of example.net. The MessageId differs on every run.

Output
{
"MD5OfMessageBody": "28bf0eba6631b5563247f1b42d9a7f17",
"MessageId": "01f94bb2-17df-43f8-9405-cea3f56f5c3b"
}

Receive the message and save the response to received.json:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" sqs receive-message \
--queue-url "$QUEUE_URL" --wait-time-seconds 0 --max-number-of-messages 1 > received.json
cat received.json

The response holds the message you sent, with its body, example.net, and the same MessageId the send returned. These are selected fields; the MessageId and ReceiptHandle differ on every run.

Output (selected fields)
{
"Messages": [
{
"MessageId": "01f94bb2-17df-43f8-9405-cea3f56f5c3b",
"ReceiptHandle": "recpt-c62497f3cafd449ca",
"Body": "example.net"
}
]
}

Then delete the message with its receipt handle, as a consumer does once it has handled a message. The first line copies the ReceiptHandle from received.json. The delete prints nothing.

Terminal window
RECEIPT_HANDLE=$(python3 -c 'import json; print(json.load(open("received.json"))["Messages"][0]["ReceiptHandle"])')
aws --endpoint-url "$VERA_ENDPOINT" sqs delete-message \
--queue-url "$QUEUE_URL" --receipt-handle "$RECEIPT_HANDLE"

Delete the queue, which prints nothing, then the response file and the config file:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" sqs delete-queue --queue-url "$QUEUE_URL"
rm received.json vera-aws-config

Then close the terminal. Its AWS_CONFIG_FILE still points at the config file you just deleted, so don’t run more AWS commands in it.

  • SQS: what else the emulator supports there, and where it stops. A message made visible again with ChangeMessageVisibility isn’t returned by the next receive, and an empty receive doesn’t wait for messages. The page also covers per-message delays and FIFO deduplication.
  • Using the emulator: the setup every service shares, and the limits that apply to all of them.
  • All services: what you can test on each AWS service.