WHAT YOU'LL LEARN
  • how to apply different infrastructure settings per environment using Infra.Env.Is

Overview
anchor

It’s common to want different infrastructure settings per environment — for example, enabling OpenSearch only in production, or applying different AWS tags per environment. Use Infra.Env.Is to conditionally apply any Infra.* configuration.

Configuration
anchor

webiny.config.tsx

Infra.Env.Is accepts either a single environment name string or an array of names. Any Infra.* component can be nested inside it.

Redeploying After Changes
anchor

After making changes, redeploy by running the webiny deploy command:

Use --env <name> to target a specific environment if needed.