Skip to content

cowcoa/aws-cdk-go-examples

Repository files navigation

aws-cdk-go-examples

Example projects for AWS CDK implemented in Golang.

Prerequisites

  1. 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.
  2. Install Node Version Manager:
    Install NVM - Install NVM and configure your environment according to this document.
  3. Install Node.js:
    nvm install 16.3.0
  4. Install AWS CDK Toolkit:
    npm install -g aws-cdk
  5. Install Golang:
    Download and Install - Download and install Go quickly with the steps described here.
  6. Install Docker:
    Install Docker Engine - The installation section shows you how to install Docker on a variety of platforms.
  7. Make sure you also have GNU Make, jq installed.

Deployment

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.

Examples

List of examples.

About

Example projects for AWS CDK implemented in Golang.

Topics

Resources

License

Stars

Watchers

Forks

Languages