webiny-infrastructure-extensions

Customize Webiny AWS infrastructure using Pulumi handlers and declarative Infra components.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-infrastructure-extensions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-infrastructure-extensions
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/infrastructure-extensions
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-infrastructure-extensions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Webiny projects often need AWS infrastructure changes beyond the defaults, such as custom domains, VPC settings, OpenSearch, resource tagging, or blue-green deployments. This Skill guides you through modifying infrastructure safely using Pulumi handlers and declarative components in webiny.config.tsx instead of manually editing cloud resources.

Core Features & Use Cases

  • Custom Pulumi Handlers: Implement CorePulumi.Interface to add or modify AWS resources like CloudWatch alarms, S3 buckets, and Lambda settings during deployment.
  • Declarative Infra Components: Configure regions, tags, OpenSearch, VPC, custom domains, and blue-green deployments directly in webiny.config.tsx with <Infra.*> components.
  • Environment-Conditional Config: Apply settings only in specific environments using <Infra.Env.Is>, and distinguish production-grade environments.
  • Use Case: You need a custom domain with an ACM certificate on your Admin app and OpenSearch enabled only in production. Add <Infra.Admin.CustomDomains> and wrap <Infra.OpenSearch enabled={true} /> inside <Infra.Env.Is env="prod">, then run yarn webiny deploy core.

Quick Start

Ask the AI to add a custom Pulumi handler or configure an Infra component such as AWS tags or a custom domain in your webiny.config.tsx file.

Frequently Asked Questions about webiny-infrastructure-extensions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize Webiny AWS infrastructure with Pulumi?

Create a class implementing CorePulumi.Interface with an execute method that accesses app.resources, export it via CorePulumi.createImplementation, and register it with <Infra.Core.Pulumi src="/extensions/MyHandler.ts" /> in webiny.config.tsx. Deploy with yarn webiny deploy core.

How do I set a custom domain for the Webiny Admin app?

Use the <Infra.Admin.CustomDomains> component in webiny.config.tsx with your domains list, sslMethod such as sni-only, and the ACM certificateArn. The certificate must exist in AWS Certificate Manager before deployment.

Can I enable OpenSearch only for production environments in Webiny?

Yes, wrap <Infra.OpenSearch enabled={true} /> inside <Infra.Env.Is env="prod"> so it applies only to production. You can also pass an array of environments like env={["dev", "staging"]} for non-production settings.

Why does my Webiny Pulumi handler fail to build?

A common cause is omitting the .ts file extension in the src prop of <Infra.Core.Pulumi>. The registration must include the full path with extension, for example src={"/extensions/MyCorePulumiHandler.ts"}.

Does Webiny support blue-green deployments?

Yes, configure <Infra.BlueGreenDeployments> with enabled set to true, ACM certificate and domain mappings for api, admin, website, and preview, plus a deployments array defining named variants like green and blue per environment.