AWS CDK Toolkit
Project description
cdk-toolkit
AWS CDK Toolkit
Getting Started
Install AWS CDK
npm install -g aws-cdk
Create CDK Project Directory
mkdir cdk-proj
cd cdk-proj
Create CDK Project Environment
cdk init app --language python
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt
Add Stacks to CDK Project
from aws_cdk import (
Stack,
)
from constructs import Construct
from cdk_toolkit import storage
class CdkProjStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
bucket_name = "cdk-proj-bucket-name-test"
s3_bucket = storage.createS3Bucket(self, bucket_name, versioned=False)
Update CDK Project App
# Sample App
import aws_cdk as cdk
from aws_cdk import Aws, Stack, Tags
from cdk_proj.cdk_proj_stack import CdkProjStack
# AWS CDK App
app = cdk.App()
# AWS CDK Environment
AWS_ACCOUNT_NUMBER="111111111"
AWS_ACCOUNT_REGION="us-west-2"
cdk_environment = cdk.Environment(account=AWS_ACCOUNT_NUMBER, region=AWS_ACCOUNT_REGION)
# Project Stack
CdkProjStack(app, "CdkProjStack", env=cdk_environment)
app.synth()
Create CDK Bootstrap
echo AWS_ACCOUNT_NUMBER=111111111
echo AWS_ACCOUNT_REGION=us-west-2
cdk bootstrap aws://$AWS_ACCOUNT_NUMBER/$AWS_ACCOUNT_REGION ---toolkit-stack-name CDK-TOOLKIT --qualifier cdktoolkit
Deply CDK Project
# Preview CDK Project Stack Deployment
cdk diff
# Deploy CDK Project Stack(s)
cdk deploy
# Destroy CDK Project Stack(s)
cdk destroy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk-toolkit-0.0.5.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file cdk-toolkit-0.0.5.tar.gz
.
File metadata
- Download URL: cdk-toolkit-0.0.5.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc9cfcf43d9c62c96b04c3cca5d7d25d68d9431e1f5b0f8a0f3b7db649b71ca |
|
MD5 | 42d1676eacce980c7e8617bbcf73d5cf |
|
BLAKE2b-256 | 92238a6ff64578efabf18aac7eed36013219e4037f72efb407561b411be540d3 |
File details
Details for the file cdk_toolkit-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: cdk_toolkit-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2480e85876d45269bde43d13c05c6f7dcbd2dc6bba150aa6b51513abcc436ebf |
|
MD5 | 6ee22ab1223ca2de66834e3dc126c7e0 |
|
BLAKE2b-256 | 35b413a7a8c4f42f48dbbb913abaa7ad1d3844307ba9c8e6849afd5955de06c5 |