@vyriy/cdk
v0.7.5
Published
Shared AWS CDK helpers for Vyriy projects
Downloads
4,127
Readme
@vyriy/cdk
Shared AWS CDK helpers for Vyriy projects.
Purpose
This package provides a small set of CDK-oriented helpers used across Vyriy stacks:
id()for consistent stack namingoutput()for reading synthesizedcdk.out/cdk-outputs.jsonstack()for creating a stack with shared env, tags, and termination protection defaults
stack() requires an explicit STAGE environment variable. The shared env helpers default to
local for development, but CDK stacks must use a real cloud deployment stage such as dev,
staging, or production.
Install
With npm:
npm install @vyriy/cdkWith Yarn:
yarn add @vyriy/cdkUsage
Import from the package root:
import { id, output, stack } from '@vyriy/cdk';Example:
import { Stack } from 'aws-cdk-lib';
import { output, stack } from '@vyriy/cdk';
const appStack = stack(Stack);
const apiUrl = output().ApiGatewayUrl;
console.log(appStack.stackName, apiUrl);