Skip to main content


Resources represent cloud services that are part of the application. They expose both a preflight API used to define their deployment configuration and an inflight API used to interact with them at runtime. Resources are an extension of the Construct Programming Model and as such any AWS Constructs can be natively used in Wing applications.

The following code defines a bucket resource:

new cloud.Bucket();
Conceptual Example

The following code block is meant to serve as an example of what is possible based on the wing language specifications. Additional feature implementations will need to be completed to make the example possible.

The following code declares a new resource called SafeQueue which contains a queue with a dead-letter-queue associated with it:

resource SafeQueue extends cloud.Queue {
init() {
let dlq = new cloud.Queue();

dlq.on_message(inflight (m: str) => {
log.error("dead-letter: ${m}");