webiny-infrastructure-extensions
できること
Pulumiのハンドラーと特別な設定のコンポーネントを使い、Webinyプロジェクトの AWSのインフラをカスタマイズする方法を説明します。クラウドのリソース、リージョン、デプロイのモードを変える必要がある開発者向けです。
使う場面
- ✓Webinyプロジェクトに、追加のストレージのバケットやアラームなど、カスタムのAWSのリソースを加えたい開発者がいるとき。
- ✓Webinyプロジェクトのカスタムドメイン、VPC、リソースのタグを設定する必要があるとき。
- ✓本番環境と開発環境で、異なるインフラの設定がほしいとき。
スキルのリンク
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/infrastructure-extensions/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Webinyプロジェクトのクラウドのセットアップに、追加のS3バケットを加えるにはどうすればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
開発者は、クラウドのセットアップを変える小さなコードのハンドラーを書き、それをプロジェクトの設定ファイルに登録します。スキルは、どの設定を使い、どこに置くかを説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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"} />
{/* Apply tags to all AWS resources -- multiple calls are merged */}
<Infra.Aws.Tags tags={{ OWNER: "me", PROJECT: "my-project" }} />
<Infra.Aws.Tags tags={{ COST_CENTER: "engineering" }} />
Search & Networking
OpenSearch, DynamoDB and the S3 bucket belong to the Core app, so they live under Infra.Core. The older top-level names (Infra.OpenSearch, Infra.DynamoDb, Infra.S3Bucket) still work and point at the same components.
{
/* Enable/disable OpenSearch */
}
<Infra.Core.OpenSearch enabled={true} />;
{
/* Enable/disable VPC deployment */
}
<Infra.Vpc enabled={false} />;
Backups
Both are on by default for production environments and off for all others. Set enabled to override that in either direction.
{
/* DynamoDB point-in-time recovery (primary, audit logs and, with OpenSearch, the ddb-os table) */
}
<Infra.Core.DynamoDb.Pitr enabled={false} />;
{
/* S3 versioning on the File Manager bucket */
}
<Infra.Core.S3Bucket.Versioning enabled={false} />;
Resource Naming
{
/* Prefix all Pulumi resource names */
}
<Infra.PulumiResourceNamePrefix prefix={"myproj-"} />;
{
/* Define which environments use production-grade infrastructure */
}
<Infra.ProductionEnvironments environments={["prod", "staging"]} />;
Custom Domains
<Infra.Admin.CustomDomains
domains={["admin.example.com"]}
sslMethod="sni-only"
certificateArn="arn:aws:acm:us-east-1:123456789:certificate/abc-123"
/>
Blue-Green Deployments
<Infra.BlueGreenDeployments
enabled={true}
domains={{
acmCertificateArn: "arn:aws:acm:us-east-1:123456789:certificate/abc-123",
sslSupportMethod: "sni-only",
domains: {
api: ["api.example.com"],
admin: ["admin.example.com"],
website: ["website.example.com"],
preview: ["preview.example.com"]
}
}}
deployments={[
{ name: "green", env: "dev", variant: "green" },
{ name: "blue", env: "dev", variant: "blue" }
]}
/>
Environment-Conditional Configuration
Use <Infra.Env.Is> to apply settings only in specific environments:
{
/* Production only */
}
<Infra.Env.Is env="prod">
<Infra.Aws.Tags tags={{ ENV: "production" }} />
<Infra.Core.OpenSearch enabled={true} />
</Infra.Env.Is>;
{
/* Non-production (accepts array) */
}
<Infra.Env.Is env={["dev", "staging"]}>
<Infra.Aws.Tags tags={{ ENV: "non-production" }} />
<Infra.Core.OpenSearch enabled={false} />
</Infra.Env.Is>;
Project-Level Settings
{
/* Disable telemetry */
}
<Project.Telemetry enabled={false} />;
{
/* Auto-install for CI/CD (skip the installation wizard)
よくある質問
カスタムのコードはどこに置きますか?
ハンドラーのファイルに置き、特別なコンポーネントを使ってwebiny.config.tsxファイルに登録します。ファイルのパスには.tsの拡張子が必要です。
これでOpenSearchを設定できますか?
はい。スキルは、VPC、リージョン、タグと並んで、組み込みの設定の一つとしてOpenSearchを扱っています。
本番と開発の違いも扱いますか?
はい。本番と開発のモードで、異なるインフラの設定をする方法を説明しています。
詳細
作者による元の説明
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>.
repo: webiny/webiny-js
人気
- GitHubのスター
- 8.1k
- ランキング
- #12613
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
prd-to-plan
8.1k製品要件書を、それぞれ端から端まで成立する小さなスライスの段階的な計画に変え、Markdownファイルとして保存するよう、エージェントを支援します。
webiny-admin-architect
8.1kビジネスロジックの層とプレゼンターのパターンを使い、Webinyプラットフォームの管理画面を作る方法をエージェントに教えます。
webiny-admin-permissions
8.1k自動生成される権限フォームや、表示・非表示のチェックを含め、Webinyの管理画面に権限の制御を追加するよう、エージェントに教えます。
webiny-form-model
8.1kビルダーで宣言的にフィールドを定義し、レイアウト、検証、条件付きのルールを使って、Webinyのフォームを作るよう、エージェントに教えます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。