The bin
directory contains the entry point for the CDK application and scripts required to deploy the infrastructure.
- README-bin.md: Documentation for the
bin
directory. - cdk-rag-app.*: Entry point scripts for the CDK application.
The cdk-rag-app
script is the main entry point for deploying the CDK stack. It initializes the application, loads environment variables, and defines the stack configuration.
- Source Map Support: Enables enhanced debugging by mapping runtime errors to the original source files.
- AWS CDK App Initialization:
- Creates an instance of the CDK app.
- Loads the
RagAppStack
defined in thelib
directory.
- Environment Configuration:
- Reads environment variables from a
.env
file to define the AWS account and region for deployment. - Supports environment-agnostic stacks or specialized deployments.
- Reads environment variables from a
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { RagAppStack } from '../lib/cdk-rag-app-stack';
require('dotenv').config();
const app = new cdk.App();
new RagAppStack(app, process.env.CDK_STACK_NAME!, {
env: {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION
}
});