Example projects for AWS CDK implemented in Golang.
- Install and configure AWS CLI environment:
Installation - Installing or updating the latest version of the AWS CLI.
Configuration - Configure basic settings that AWS CLI uses to interact with AWS.
NOTE: Make sure your IAM User/Role has sufficient permissions. - Install Node Version Manager:
Install NVM - Install NVM and configure your environment according to this document. - Install Node.js:
nvm install 16.3.0
- Install AWS CDK Toolkit:
npm install -g aws-cdk
- Install Golang:
Download and Install - Download and install Go quickly with the steps described here. - Install Docker:
Install Docker Engine - The installation section shows you how to install Docker on a variety of platforms. - Make sure you also have GNU Make, jq installed.
Run the following command to deploy AWS infra and code by CDK Toolkit:
cdk-cli-wrapper-dev.sh deploy
If all goes well, you will see output like below:
✅ CDKGoExample-ABC
✨ Deployment time: 144.82s
Stack ARN:
arn:aws:cloudformation:ap-northeast-1:123456789012:stack/CDKGoExample-ABC/225b9050-a414-11ec-b5c2-0ab842e4df54
✨ Total time: 150.13s
You can also clean up the deployment by running command:
cdk-cli-wrapper-dev.sh destroy
cdk-cli-wrapper-dev.sh is a wrapper script for CDK command to which you can pass any CDK command line arguments.
List of examples.
- APIGateway+Lambda+DynamoDB - AWS serverless architecture to demonstrate how to build a simple chatroom service.
- Simple EKS cluster - Demonstrate how to create an EKS cluster and manage related addons.