Skip to main content

Unified Infrastructure and Application Code

Integrates with the AWS CDK, translates TypeScript application code to cloud resources and domain specific languages, and infers optimal IAM policies from business logic.

Familiar and friendly TypeScript syntax

Adopt powerful cloud-native services without boilerplate configurations or the complexity of domain specific languages.

Secure by default

Minimally permissive IAM Policies are inferred from your business logic, ensuring that your IAM Roles only have access to the resources and operations they absolutely need.

Typesafe cloud resources

Use types to describe the interfaces of your cloud functions and the structure of data in your databases. Catch common errors at compile time instead of waiting until deployment.

Write your application logic and infrastructure in one place.
const helloWorld = new Function(this, "HelloWorld", () => {
console.log("hello world");
});
Safeguard the data in your Dynamo Tables using TypeScript's powerful type system.
interface Task {
taskId: string;
description: string;
}
const tasks = Table.fromTable<Task, "taskId">(this, "Tasks", {
billingMode: BillingMode.PAY_PER_REQUEST
});
Integrate services with simple function calls. Never worry about IAM Policies, environment variables or other boilerplate.
const getTask = new Function(this, "GetTask", async (taskId: string) => {
return tasks.getItem({
taskId
});
});
Upgrade from "serverless" to "functionless" by writing AWS Step Functions in pure TypeScript.
new StepFunction(
stack,
"Validator",
async (input: ValidateRequest) => {
const status = validate({ commentText: input.commentText });
if (status === "bad") {
await $AWS.DynamoDB.DeleteItem({
Table: posts,
Key: {
pk: {
S: `Post|${input.postId}`,
},
sk: {
S: `Comment|${input.commentId}`,
},
},
});
}
});
Deploy a GraphQL API to AWS Appsync without ever touching a single line of Velocity Templates.
const addTask = new AppsyncResolver<{text: string}, Task>(($context) => {
return tasks.appsync.putItem({
key: {
taskId: {
S: $util.autoUuid())
}
},
attributeValues: {
text: $util.dynamodb.toDynamoDB($context.arguments.text),
createTime: {
S: $util.time.nowISO8601()
}
}
});
});
Filter, transform and send Events from AWS Event Bridge to your cloud resources using fluent APIs.
const tasks = new EventBus<TaskCompleted | TaskDeleted>(this, "Tasks");
tasks
.when(
this,
"OnTaskCompleted",
(event) => event["detail-type"].kind === "TaskCompleted"
)
.map(event => ({
...event,
}))
.pipe(handleTaskCompletedWorkflow);