Start building

Messaging and events

SQS → archive in S3 → acknowledge

A bounded manual worker example. No automated redrive or exactly-once claim. A repeated archive key needs a business idempotency/reconciliation policy.

  • Amazon SQS → Amazon S3
  • Intermediate
  • 5 min

Last verified 2026-10-31 at f4ce7d0 — simulation fixtures

Try this template in Studio

Studio activation is a one-time payment of USD 20.

Flow

Drawn at build time from the node positions in the template's process definitions. Numbered markers are the walkthrough stages.

Main processSQS → archive in S3 → acknowledge10 activities

Scroll sideways to see the whole flow.

Flow diagram of SQS → archive in S3 → acknowledge10 activities and 10 transitions: Manual sample, Receive one message, Parse message JSON, Normalize order, Render archive JSON, Archive before acknowledgement, Acknowledge successful work, Business receipt, No available message, Return receipt.Message availableEmpty queueManual samplestartReceive one messagesqs.receive1Parse message JSONjson.parse2Normalize orderdata.mapper3Render archive JSONjson.render4Archive beforeacknowledgements3.write5Acknowledge successfulworksqs.acknowledge6Business receiptassign7No available messageassignReturn receiptend
List the 10 activities and 10 transitions

Activities

  1. Manual sample start
  2. Receive one message sqs.receive
  3. Parse message JSON json.parse
  4. Normalize order data.mapper
  5. Render archive JSON json.render
  6. Archive before acknowledgement s3.write
  7. Acknowledge successful work sqs.acknowledge
  8. Business receipt assign
  9. No available message assign
  10. Return receipt end

Transitions

  • Manual sample → Receive one message (on success)
  • Receive one message → Parse message JSON (condition: Message available)
  • Receive one message → No available message (otherwise: Empty queue)
  • No available message → Return receipt (on success)
  • Parse message JSON → Normalize order (on success)
  • Normalize order → Render archive JSON (on success)
  • Render archive JSON → Archive before acknowledgement (on success)
  • Archive before acknowledgement → Acknowledge successful work (on success)
  • Acknowledge successful work → Business receipt (on success)
  • Business receipt → Return receipt (on success)

Walkthrough

  1. Receive one messageReview the connected input/output mappings and declared connector permissions.
  2. Parse message JSONReview the connected input/output mappings and declared connector permissions.
  3. Normalize orderReview the connected input/output mappings and declared connector permissions.
  4. Render archive JSONReview the connected input/output mappings and declared connector permissions.
  5. Archive before acknowledgementReview the connected input/output mappings and declared connector permissions.
  6. Acknowledge successful workReview the connected input/output mappings and declared connector permissions.
  7. Business receiptReview the connected input/output mappings and declared connector permissions.

What you will practise

  • Handle empty queues explicitly.
  • Map JSON into a storage object with a different connection.
  • Acknowledge only after business work succeeds.

Sample cases

3 cases with 8 assertions, run with python -m server.integration examples --all in simulation.

Archive then acknowledge

Passed

Explicit fixtures only; no cloud request.

Expected result Successful archive followed by explicit acknowledgement.

3/3 assertions

  • Completed simulation
  • Expected receipt
  • No unacknowledged messages

This sample run only; not a production certification.

Empty queue

Passed

No message is a normal routing result, not a failure.

Expected result No downstream business calls.

3/3 assertions

  • Completed simulation
  • Empty receipt
  • No leased message

This sample run only; not a production certification.

Invalid message: never acknowledge

Expected failure verified

Parsing fails; no archive or acknowledgement fixture is available. In live operation the message becomes visible again after its visibility timeout.

Expected result Failed processing retains an unacknowledged message.

2/2 assertions

  • Failed processing
  • Unacknowledged for investigation

This sample run only; not a production certification.

Prerequisites

Runtime
Cohuno runtime 1.27.0, the version recorded when these cases last passed.
Starter
Manual start; no listener.
Optional dependencies
  • Cloud SDKs (requirements-cloud.txt) needed only for live connections; simulation uses fixtures
Selected for this closure by the same rules as runtime packaging.
Simulation fixtures
  • s3_archive s3 · s3.write
  • sqs_orders sqs · sqs.receive, sqs.acknowledge
Every sample run replaces these connections with the fixtures defined in its case. A live run needs an operator to configure an authorized connection for each.
Verification details

Provenance

What was verified, and when. The content part changes whenever the pack, a process in its closure, the runtime version or a case result changes; the gallery check then fails until the gallery is regenerated and the changed templates are verified again.

Verified content

Pack SHA-256
54e904f0c7a8dcf79e4effe2a692281bee7eb850c894b3b88a78a1b308fd3e1d
Closure SHA-256
8ab0e20ec403c3a846be2f94f2d33bf997fa23db0549055bd352ae5e870dcd7e
Runtime
1.27.0
Results
3/3 cases, 8/8 assertions, mode simulate, external calls: none.
Files in the closure
  • server/integration/example_packs/v14_sqs_archive.json
  • server/integration/templates/v14_sqs_archive.json

Verification event

Commit
f4ce7d08eedc90267b405ed1974344153a8b3a34
Verified at (UTC)
2026-10-31T21:19:21Z

How the Cohuno team reproduces this check

PYTHONPATH=. python -m server.integration examples --example v14_sqs_archive
PYTHONPATH=. python scripts/export_public_gallery.py --check