# Webiny Infrastructure Extensions

Modifying AWS infrastructure using Pulumi handlers and declarative Infra components.

- Repository: https://github.com/webiny/webiny-js (8051 stars)
- Category: DevOps
- License: see repository
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add webiny/webiny-js --skill webiny-infrastructure-extensions -g -a claude-code -y`
Codex: `npx skills add webiny/webiny-js --skill webiny-infrastructure-extensions -g -a codex -y`
Cursor: `npx skills add webiny/webiny-js --skill webiny-infrastructure-extensions -g -a cursor -y`
Gemini CLI: `npx skills add webiny/webiny-js --skill webiny-infrastructure-extensions -g -a gemini-cli -y`

## Description

Modifying AWS infrastructure using Pulumi handlers and declarative Infra components. Use this skill when the developer wants to customize AWS infrastructure, add Pulumi handlers, configure OpenSearch, VPC, resource tags, regions, custom domains, blue-green deployments, environment-conditional config, or manage production vs development infrastructure modes. Covers CorePulumi.Interface, all <Infra.*> declarative components, and <Infra.Env.Is>.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Infrastructure Extensions

## TL;DR

Infrastructure extensions modify your AWS infrastructure using Pulumi handlers and declarative `<Infra.*>` components in `webiny.config.tsx`. Pulumi handlers implement `CorePulumi.Interface` and are registered via `<Infra.Core.Pulumi>`. Declarative components configure OpenSearch, VPC, tags, regions, custom domains, blue-green deployments, and environment-specific settings.

## Pulumi Handler Pattern

Write custom Pulumi code that runs during infrastructure deployment:

```typescript
// extensions/MyCorePulumiHandler.ts
import { Ui } from "webiny/infra";
import { CorePulumi } from "webiny/infra/core";

class MyCorePulumiHandlerImpl implements CorePulumi.Interface {
  constructor(private ui: Ui.Interface) {}

  execute(app: any) {
    this.ui.info("Executing MyCorePulumiHandler with environment:", app.env);

    // Access and modify Pulumi resources here
    // app.resources gives you access to all provisioned resources
  }
}

export default CorePulumi.createImplementation({
  implementation: MyCorePulumiHandlerImpl,
  dependencies: [Ui]
});
```

Register (**YOU MUST include the `.ts` file extension in the `src` prop**, omitting it will cause a build failure):

```tsx
<Infra.Core.Pulumi src={"/extensions/MyCorePulumiHandler.ts"} />
```

### Use Cases for Pulumi Handlers

- Add custom AWS resources (CloudWatch alarms, extra S3 buckets, Lambda functions)
- Modify existing resource properties (Lambda memory, timeouts, environment variables)
- Add conditional infrastructure based on environment
- Integrate with third-party infrastructure providers

## Declarative Infrastructure Components

These components go directly in `webiny.config.tsx` -- no separate extension file needed:

### AWS Configuration

```tsx
{/* Set the AWS region */}
<Infra.Aws.DefaultRegion name={"us-east-1"} />

The rest: https://github.com/webiny/webiny-js/blob/HEAD/skills/user-skills/infrastructure-extensions/SKILL.md
