Wing is a cloud-oriented programming language that allows developers to build distributed systems without managing underlying infrastructure. It treats the cloud as a computer, leveraging managed services and distributed programming to create scalable, highly-available, and robust systems. The Wing compiler produces a bundle of artifacts for deployment, including Terraform files for infrastructure definition and JavaScript code for cloud compute resources. For example, when targeting AWS, Wing automatically maps resources to Amazon S3 (buckets), Amazon SQS (queues), Amazon DynamoDB (counters), and AWS Lambda (handlers), while generating least-privilege IAM security policies.
bring cloud;
let queue = new cloud.Queue(timeout: 2m);
let bucket = new cloud.Bucket();
let counter = new cloud.Counter(initial: 100);
queue.setConsumer(inflight (body: str) => {
let next = counter.inc();
let key = "myfile-{next}.txt";
bucket.put(key, body);
});