Skip to main content
An AI backend can run as a SpringWinter web server when it exposes supported HTTP traffic, or as a worker when it consumes background jobs without a public endpoint. Calling an external model API does not require a GPU. Durable agent memory and work queues must live outside temporary task filesystems.

Select the workload type

See the canonical compatibility reference. Model endpoints and Bedrock are separate features from ordinary containers. Do not infer operational availability from an exposed API or general AWS GPU support.

Architecture and prerequisites

This is one possible design. The example worker below uses Valkey only and does not call a model. You need a reviewed repository, lockfiles, Dockerfile, AWS connection and GitHub authorization. Add a model-provider account only if the application needs one. Provider token usage has separate costs and rate limits. A remote MCP server needs its own authentication and authorization. HTTPS alone is insufficient. Do not expose an unauthenticated server that can read source, run shell commands or access account data. Follow the MCP implementation’s current official deployment and security guidance for the chosen transport.

Reproduce the reviewed worker example

The unit tests use a fake cache. They do not require or open an existing service. The container build requires Docker. See the tagged worker README for locked dependencies and source. The sample consumes a stream and uppercases its text field. It records a deterministic result before acknowledgment. It uses database 0, TLS and a cluster-aware client. A standalone Redis process is not a substitute for the required cluster behavior. Verify XAUTOCLAIM support on the selected service.

Deploy and verify

Create or explicitly reuse a compatible private Valkey cache. In the dashboard, deploy a GitHub worker with the correct Dockerfile and context. Configure runtime REDIS_URL securely. Do not give a worker a web port, health path or public URL. For an HTTP AI API, choose a web server instead, bind to 0.0.0.0, and supply an unauthenticated health endpoint that returns HTTP 200 without exposing secrets. Store model keys as runtime secrets, never browser build variables. A coding agent can prepare either plan. REST clients must use the separate Workers API, Web servers API and Caches API. Read their current source requirements and response envelopes. Observe the exact deployment workflow. With authorization and synthetic input, enqueue one harmless job and verify its result and acknowledgment. For a remote MCP server, test a harmless authenticated tool call from the intended client. Do not infer successful MCP operation from an HTTP health response.

Delivery, retention and shutdown limits

The worker sample is at-least-once delivery, not exactly once. Results expire after one day; stream entries do not expire automatically. Select a trim/archive policy. Work that can outlast the sample’s 60-second claim interval needs ownership renewal before multiple consumers are safe. Add bounded retries and dead-letter handling before using business jobs. Handle SIGTERM and store resumable state externally. A long-running worker can be restarted or replaced; it is not a guarantee that one process runs forever. Avoid repeating paid model calls after an uncertain failure unless you can reconcile the result or use a provider-supported idempotency mechanism.

Cost, security and cleanup

Use cost estimation for worker compute, Valkey, logs, storage and transfer. Add model token charges and bounded per-job budgets. Provider rate limits and maximum concurrency are not billing caps. Keep prompts, model keys and customer payloads out of diagnostics. Use synthetic data for verification. Restrict any downstream tool permissions to the intended task. Stop unsupported privileged-container or GPU requirements rather than silently substituting resources. For cleanup, stop producers before deleting consumers and queues. Decide whether pending jobs, state and objects must be retained. Revoke temporary provider keys separately. See deployment troubleshooting.

Questions

Does persistent agent mean persistent local disk? No. It means the application preserves its required state in supported durable services and resumes safely after replacement. Can I run a scheduled script? A worker can run application code, but this guide does not claim a managed schedule resource. Design timing, overlap prevention and failure behavior separately. Related: full-stack architecture, customer-owned AWS, environment variables.