
Webiny Infrastructure Extensions
Modifying AWS infrastructure using Pulumi handlers and declarative Infra components.
Install
npx skills add webiny/webiny-js --skill webiny-infrastructure-extensions -g -a claude-code -y- Repository
- webiny/webiny-js8.1k
- Category
- DevOps
- Updated
- 5d ago
- License
- See repository
- Context cost
- Mediumabout 1,758 tokens
- Runs scripts
- No, instructions only
What it does
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>.
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:
// 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):
<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
{/* Set the AWS region */}
<Infra.Aws.DefaultRegion name={"us-east-1"} />

