---
title: AWS API
description: Generated public TypeScript reference for @relkit/aws.
search:
  exclude: true
sidebar:
  icon: braces
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

## Common APIs

- [aws](/docs/api/integrations/aws#aws)

For configuration and examples, read [deployment](/docs/modules/deployment), [aws](/docs/modules/deployment/aws).

## Public imports

- `@relkit/aws` — 5 exports
- `@relkit/aws/host` — 2 exports
- `@relkit/aws/infrastructure` — 2 exports
- `@relkit/aws/access` — 2 exports

## All exported APIs

Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API's inline sample, a maintained repository usage, or the shared module walkthrough.

| API                                                                         | Kind  | Import from                  | Example                                                                                                    |
| --------------------------------------------------------------------------- | ----- | ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [aws](/docs/api/integrations/aws#aws)                                       | Value | `@relkit/aws`                | [API example](/docs/api/integrations/aws#aws)                                                              |
| [awsAccess](/docs/api/integrations/aws#awsaccess)                           | Value | `@relkit/aws/access`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/deployment/grouped-pulumi.probe.ts#L40) |
| [AwsAdapter](/docs/api/integrations/aws#awsadapter-type-alias)              | Type  | `@relkit/aws`                | [Module example](/docs/modules/deployment)                                                                 |
| [awsHost](/docs/api/integrations/aws#awshost)                               | Value | `@relkit/aws/host`           | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/deployment/aws-integration.test.ts#L45) |
| [awsInfrastructure](/docs/api/integrations/aws#awsinfrastructure)           | Value | `@relkit/aws/infrastructure` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/deployment/grouped-pulumi.probe.ts#L40) |
| [AwsOptions](/docs/api/integrations/aws#awsoptions-type-alias)              | Type  | `@relkit/aws`                | [Module example](/docs/modules/deployment)                                                                 |
| [AwsRedisOptions](/docs/api/integrations/aws#awsredisoptions-interface)     | Type  | `@relkit/aws`                | [Module example](/docs/modules/deployment)                                                                 |
| [AwsS3Options](/docs/api/integrations/aws#awss3options-interface)           | Type  | `@relkit/aws`                | [Module example](/docs/modules/deployment)                                                                 |
| [deploymentIntegration](/docs/api/integrations/aws#deploymentintegration-1) | Value | `@relkit/aws/host`           | [Module example](/docs/modules/deployment)                                                                 |
| [deploymentIntegration](/docs/api/integrations/aws#deploymentintegration-2) | Value | `@relkit/aws/infrastructure` | [Module example](/docs/modules/deployment)                                                                 |
| [deploymentIntegration](/docs/api/integrations/aws#deploymentintegration)   | Value | `@relkit/aws/access`         | [Module example](/docs/modules/deployment)                                                                 |

## `index.ts`

### awsAccess

**Signature**

```ts
declare const awsAccess: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "access";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
    readonly operation: AccessOperationPlan;
    readonly host: DeploymentHostMaterialization;
    readonly infrastructure: DeploymentInfrastructureMaterialization;
  }) => DeploymentAccessMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/access/index.ts#L7)

### deploymentIntegration

**Signature**

```ts
declare const deploymentIntegration: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "access";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
    readonly operation: AccessOperationPlan;
    readonly host: DeploymentHostMaterialization;
    readonly infrastructure: DeploymentInfrastructureMaterialization;
  }) => DeploymentAccessMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/access/index.ts#L15)

## `materialize.ts`

### materializeAwsAccess

**Signature**

```ts
declare const materializeAwsAccess: (input: {
  readonly plan: DeploymentPlan;
  readonly stackName: string;
  readonly operation: AccessOperationPlan;
  readonly host: DeploymentHostMaterialization;
  readonly infrastructure: DeploymentInfrastructureMaterialization;
}) => DeploymentAccessMaterialization;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/access/materialize.ts#L8)

## `aws.ts`

### aws

Provisions a supported S3 or Redis adapter on AWS and grants only its workload access.

**Example**

```ts
import { aws } from "@relkit/aws";
import { s3 } from "@relkit/s3";
const receipts = aws(s3(), { versioning: true });
```

**Signature**

```ts
declare const aws: <const Adapter extends AwsAdapter>(
  adapter: Adapter,
  options?: AwsOptions<Adapter>,
) => InfrastructureProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/aws.ts#L43)

Since v0.2.0

### AwsAdapter (type alias)

**Signature**

```ts
type AwsAdapter = S3Adapter | RedisAdapter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/aws.ts#L12)

### AwsOptions (type alias)

**Signature**

```ts
type AwsOptions<Adapter extends AwsAdapter> = Adapter extends S3Adapter
  ? AwsS3Options
  : AwsRedisOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/aws.ts#L25)

### AwsRedisOptions (interface)

**Signature**

```ts
export interface AwsRedisOptions {
  readonly engine?: "valkey" | "redis";
  readonly nodeType?: string;
  readonly replicas?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/aws.ts#L19)

### AwsS3Options (interface)

**Signature**

```ts
export interface AwsS3Options {
  readonly versioning?: boolean;
  readonly forceDestroy?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/aws.ts#L14)

## `environment.ts`

### containerEnvironment

**Signature**

```ts
declare const containerEnvironment: (
  plan: DeploymentPlan,
) => readonly Readonly<{ name: string; value: DeploymentInput }>[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/environment.ts#L9)

## `index.ts`

### awsHost

**Signature**

```ts
declare const awsHost: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "host";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
  }) => DeploymentHostMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/index.ts#L7)

### deploymentIntegration

**Signature**

```ts
declare const deploymentIntegration: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "host";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
  }) => DeploymentHostMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/index.ts#L15)

## `materialize.ts`

### materializeAwsHost

**Signature**

```ts
declare const materializeAwsHost: (input: {
  readonly plan: DeploymentPlan;
  readonly stackName: string;
}) => DeploymentHostMaterialization;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/materialize.ts#L6)

## `network.ts`

### network

**Signature**

```ts
declare const network: (
  context: HostContext,
) => Pick<DeploymentHostMaterialization, "resources" | "network">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/network.ts#L4)

## `service-support.ts`

### container

**Signature**

```ts
declare const container: (context: HostContext) => Readonly<Record<string, DeploymentInput>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/service-support.ts#L30)

### role

**Signature**

```ts
declare const role: (context: HostContext, id: string) => DeploymentResourceOperation;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/service-support.ts#L20)

## `service.ts`

### service

**Signature**

```ts
declare const service: (
  context: HostContext,
  network: DeploymentHostMaterialization["network"],
) => Pick<DeploymentHostMaterialization, "resources" | "workload" | "outputs">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/service.ts#L12)

## `shared.ts`

### HostContext (interface)

**Signature**

```ts
export interface HostContext {
  readonly plan: DeploymentPlan;
  readonly stackName: string;
  readonly prefix: string;
  readonly tags: Readonly<Record<string, string>>;
  readonly region: DeploymentInput;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L9)

### hostContext

**Signature**

```ts
declare const hostContext: (plan: DeploymentPlan, stackName: string) => HostContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L17)

### hostId

**Signature**

```ts
declare const hostId: (id: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L52)

### name

**Signature**

```ts
declare const name: (value: string, max?: number) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L60)

### output

**Signature**

```ts
declare const output: (id: string, property: string) => DeploymentInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L56)

### resource

**Signature**

```ts
declare const resource: (
  context: HostContext,
  id: string,
  type: string,
  inputs: Readonly<Record<string, DeploymentInput>>,
  outputs?: readonly string[],
  dependsOn?: readonly string[],
) => DeploymentResourceOperation;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/host/shared.ts#L33)

## `index.ts`

### "./aws.js" (namespace export)

Re-exports all named exports from the "./aws.js" module.

**Signature**

```ts
export * from "./aws.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/index.ts#L1)

## `index.ts`

### awsInfrastructure

**Signature**

```ts
declare const awsInfrastructure: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "infrastructure";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
    readonly operation: InfrastructureOperationPlan;
    readonly host: DeploymentHostMaterialization;
  }) => DeploymentInfrastructureMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/index.ts#L7)

### deploymentIntegration

**Signature**

```ts
declare const deploymentIntegration: Readonly<{
  kind: "deployment-integration";
  protocolVersion: 1;
  integrationId: "aws";
  role: "infrastructure";
  materialize: (input: {
    readonly plan: DeploymentPlan;
    readonly stackName: string;
    readonly operation: InfrastructureOperationPlan;
    readonly host: DeploymentHostMaterialization;
  }) => DeploymentInfrastructureMaterialization;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/index.ts#L15)

## `materialize.ts`

### materializeAwsInfrastructure

**Signature**

```ts
declare const materializeAwsInfrastructure: (input: {
  readonly plan: DeploymentPlan;
  readonly stackName: string;
  readonly operation: InfrastructureOperationPlan;
  readonly host: DeploymentHostMaterialization;
}) => DeploymentInfrastructureMaterialization;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/materialize.ts#L5)

## `redis.ts`

### materializeRedis

**Signature**

```ts
declare const materializeRedis: (
  plan: DeploymentPlan,
  stackName: string,
  operation: InfrastructureOperationPlan,
  host: DeploymentHostMaterialization,
) => DeploymentInfrastructureMaterialization;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/redis.ts#L10)

## `s3.ts`

### materializeS3

**Signature**

```ts
declare const materializeS3: (
  plan: DeploymentPlan,
  stackName: string,
  operation: InfrastructureOperationPlan,
) => DeploymentInfrastructureMaterialization;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/s3.ts#L9)

## `shared.ts`

### InfrastructureContext (interface)

**Signature**

```ts
export interface InfrastructureContext {
  readonly stackName: string;
  readonly operation: InfrastructureOperationPlan;
  readonly prefix: string;
  readonly tags: Readonly<Record<string, string>>;
  readonly region: DeploymentInput;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L9)

### assertAdapter

**Signature**

```ts
declare const assertAdapter: (
  operation: InfrastructureOperationPlan,
  capability: string,
  adapterId: string,
  features: readonly string[],
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L79)

### context

**Signature**

```ts
declare const context: (
  appId: string,
  graphHash: string,
  stackName: string,
  operation: InfrastructureOperationPlan,
) => InfrastructureContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L17)

### id

**Signature**

```ts
declare const id: (context: InfrastructureContext, suffix: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L57)

### name

**Signature**

```ts
declare const name: (value: string, max?: number) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L61)

### output

**Signature**

```ts
declare const output: (
  context: InfrastructureContext,
  suffix: string,
  property: string,
) => DeploymentInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L49)

### resource

**Signature**

```ts
declare const resource: (
  context: InfrastructureContext,
  suffix: string,
  type: string,
  inputs: Readonly<Record<string, DeploymentInput>>,
  outputs?: readonly string[],
) => DeploymentResourceOperation;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L32)

### settings

**Signature**

```ts
declare const settings: (value: unknown) => Readonly<Record<string, unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/aws/src/infrastructure/shared.ts#L73)
