https://github.com/operationalfallacy/cdk-js-barebone
A barebone CDK project in JavaScript
https://github.com/operationalfallacy/cdk-js-barebone
Last synced: 27 days ago
JSON representation
A barebone CDK project in JavaScript
- Host: GitHub
- URL: https://github.com/operationalfallacy/cdk-js-barebone
- Owner: OperationalFallacy
- Created: 2024-11-13T16:22:41.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-13T17:01:47.000Z (over 1 year ago)
- Last Synced: 2024-11-13T17:27:54.620Z (over 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS CDK JavaScript Project
This project is a basic example of the AWS Cloud Development Kit (CDK) with JavaScript. It shows how to define cloud infrastructure using code and deploy it with the AWS CDK.
## Prerequisites
- [Node.js](https://nodejs.org/) (version 14.x or later)
- [AWS CDK CLI](https://docs.aws.amazon.com/cdk/latest/guide/cli.html) (version 2.x or later)
- AWS account and credentials configured
## Project Structure
- `min-cdk.js`: The entry point of the CDK application, which defines the Cloudformaiton stack and resources.
- `cdk.json`: Configuration file for the CDK CLI. This is an entry point for the CDK application.
## Native Node commands for CDK stacks
- `node listStacks.js`: Lists the stacks in the app (equivalent of `cdk list`).
- `node synthStacks.js`: Synthesizes Cloudformation template for the application (equivalent of `cdk synth`).
## CDK CLI commands with extensive logic
- `cdk deploy`: Deploys stacks defined in the app.
- `cdk diff`: Compares the deployed Cloudformation stack with the current state.
## Getting Started
1. **Clone the repository**:
```bash
git clone
cd
```
2. **Install dependencies**:
```bash
npm install
```
3. **Deploy the stack**:
```bash
cdk deploy --profile
```
4. **Clean up resources**:
After you finish experimenting, delete the resources to avoid incurring charges:
```bash
cdk destroy --profile
```