Skip to content

diegoisaza/my-first-cdk-project

 
 

Repository files navigation

Welcome to my first CDK project[s]

Here you will learn to use CDK to deploy different AWS resources. All the sample code are tagged with intuitive tag-names.

  1. 🧰 Prerequisites

    • 🛠 AWS CLI Installed & Configured - Get help here
    • 🛠 AWS CDK Installed & Configured - Get help here
    • 🛠 Python Packages, Change the below commands to suit your operating system, the following are written for _Amazon Linux 2
      • Python3 - yum install -y python3
      • Python Pip - yum install -y python-pip
      • Virtualenv - pip3 install virtualenv
  2. ⚙️ Setting up the environment

    For example, If you are looking to learn how to deploy an EC2 instance with the latest AMI in any region, This branch is tagged as ec2_with_latest_ami_in_any_region.

    git clone --branch ec2_with_latest_ami_in_any_region https://github.com/miztiik/my-first-cdk-project.git
    cd my-first-cdk-project
  3. 🚀 Deployment using AWS CDK

    # If you DONT have cdk installed
    npm install -g aws-cdk
    # If this is first time you are using cdk then, run cdk bootstrap
    # cdk bootstrap
    
    
    # Make sure you in root directory
    python3 -m venv .env
    source .env/bin/activate
    # Install any dependencies
    pip install -r requirements.txt
    
    # Synthesize the template and deploy it
    cdk synth
    cdk deploy
  4. 🧹 CleanUp

    If you want to destroy all the resources created by the stack, Execute the below command to delete the stack, or you can delete the stack from console as well

    cdk destroy *

    This is not an exhaustive list, please carry out other necessary steps as maybe applicable to your needs.

💡 Help/Suggestions or 🐛 Bugs

Thank you for your interest in contributing to our project. Whether it is a bug report, new feature, correction, or additional documentation or solutions, we greatly value feedback and contributions from our community. Start here

👋 Buy me a coffee

ko-fi Buy me a coffee ☕.

🏷️ Metadata

Level: 200

miztiik-success-green

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.9%
  • CSS 29.7%
  • JavaScript 7.0%
  • HTML 1.9%
  • Shell 0.5%