
Cursor is getting pretty good at writing backend code. It can generate API endpoints, database queries, authentication logic - the standard stuff you'd write in TypeScript or Go. With Encore, the code Cursor generates is also the infrastructure, in your AWS account.
When Cursor writes new SQLDatabase("users"), that's both application code and infrastructure code. Locally it provisions a PostgreSQL database for development. Deployed to AWS, it provisions RDS with backups, high availability, and security configured. Local and production environments are 1:1 - the same code generates both.
Here's a real example of what Cursor might generate:
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { api } from "encore.dev/api";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});
interface User {
id: number;
email: string;
name: string;
}
export const createUser = api(
{ method: "POST", path: "/users", auth: true },
async ({ email, name }: { email: string; name: string }): Promise<User> => {
await db.exec`
INSERT INTO users (email, name)
VALUES (${email}, ${name})
`;
return await db.queryRow<User>`
SELECT id, email, name FROM users WHERE email = ${email}
`;
}
);
This extends to other resources as well. Pub/Sub topics provision SNS and SQS. Object storage buckets become S3. Secrets get stored in AWS Secrets Manager. Cursor writes TypeScript declarations, Encore provisions the corresponding AWS resources.
// Pub/Sub → SNS + SQS
const orders = new Topic<Order>("orders", { deliveryGuarantee: "at-least-once" });
// Object storage → S3
const uploads = new Bucket("user-uploads");
// Secrets → AWS Secrets Manager
const stripeKey = secret("StripeSecretKey");
Encore analyzes the application code to understand the architecture - which services exist, what databases they use, how they communicate - and generates the corresponding infrastructure. Sounds like a lot, but it's worth reading more about how it works.
This is different from having Cursor write Terraform or Pulumi. Those tools let you define infrastructure explicitly, which means Cursor would need to generate proper Terraform configurations, understand AWS resource dependencies, and manage state correctly. AI-generated infrastructure code risks hallucinations that create security vulnerabilities, resource misconfigurations, and version conflicts - meaning you need to carefully review thousands of lines of generated IaC before deploying.
Encore doesn't use AI to generate any infrastructure code. Instead, it parses the infrastructure declarations in your application code and creates a graph of the required underlying resources. It then integrates directly with your cloud provider's APIs to programmatically provision and orchestrate the required resources, including fine-grained least-privilege IAM policies. With this approach, there's zero risk of AI hallucinations, drift, and related security issues.
This deploys to your AWS account (or GCP) as standard resources - VPC with networking across availability zones, ECS clusters, RDS databases, IAM roles, security groups. Everything appears in the AWS console for auditing, costs show up in AWS Cost Explorer, and compliance requirements map to infrastructure in your cloud. Infrastructure changes require approval before provisioning:
Infrastructure approval flow in Encore Cloud (shown with GCP)
This setup already enables companies like Groupon to develop new features faster in their AWS organization, and Pave Bank to run a licensed bank in their own GCP account.

With Encore, we've seen a 2-3x increase in development speed and 90% shorter project lead times. What used to take days or weeks of back-and-forth is now automated and completed in minutes.
If you want to try it:
# macOS
brew install encoredev/tap/encore
# Linux
curl -L https://encore.dev/install.sh | bash
# Windows
iwr https://encore.dev/install.ps1 | iex
Then create an app:
encore app create hello-world --example=ts/hello-world --editor cursor
And try prompting Cursor to create a file upload service that uses object storage:
Create a file upload API that stores files in a bucket with a 100MB size limit
Encore works entirely locally if you prefer not to use AWS. Everything runs on your machine with the same 1:1 local-to-production experience. You can also self-host or use the open-source framework without any cloud platform.


