Sample CDK projects developed by AWS Professional Services (ProServe)

AWS CDK Examples - ProServe

This repository contains a set of CDK example projects which have been developed by AWS Professional Services (ProServe).

The examples in this repository are organized by functionality. Within each business function, there may be multiple language-specific implementations, since the CDK supports multiple programming languages.

Each section contains its own README file, which describes:

  • Background of the business problem
  • Prerequisites
  • Items for consideration
  • Sample output

If a language-specific implementation requires special instructions, then a README file within the language-specific subdirectory will elaborate upon it. (For a complete list of supported languages, please refer to the AWS CDK FAQ mentioned below.)

The recommended starting point is the hello-world example.

Additional Examples are Coming

This repository currently contains a limited set of examples. However, over the next few months, additional examples will be included. Please consider checking back in from time to time to see how things evolve.

Additional Resources

  • Getting started with the AWS CDK - New users of the CDK should start here. The getting started guide describes CDK prerequisites, installation instructions, and a list of supported languages.
  • CDK Constructs - Constructs are the foundation of the CDK. It's important to understand the difference between L1 and L2 constructs, and construct library patterns. This document is a great place to get started.
  • AWS CDK Reference Documentation - This link provides detailed information about the CDK API. Additionally, once the CDK has been installed, this document can be launched by typing cdk docs from within a terminal.
  • AWS Cloud Development Kit Frequently Asked Questions (FAQ)

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Comments
  • React app example in Typescript

    React app example in Typescript

    Issue #, if available: N/A Description of changes: Added a React app example into the Typescript folder.

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • Complete CDK Stack to deploy the architecture as mentioned in the Arc…

    Complete CDK Stack to deploy the architecture as mentioned in the Arc…

    …hitecture Diagram

    Issue #, if available:

    Description of changes:

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • AWS CDK code for AWS ElastiCache that allows for Replication Group with multi-shards and multiple primary nodes, the security for Auth Token and RBAC, plus the user group and users, etc.

    AWS CDK code for AWS ElastiCache that allows for Replication Group with multi-shards and multiple primary nodes, the security for Auth Token and RBAC, plus the user group and users, etc.

    This CDK sample code is going to accomplish the following -

    1. AWS ElastiCache that allows for Replication Group for multi-shards for multiple primary nodes.
    2. Data security for encryption at rest and in transit.
    3. User security with Auth Token and RBAC with user group and multiple users, by integrate with AWS Secrets for auto generate the token and user passwords.
    4. Example build the Parameter Group that override the AWS ElastiCache default Parameter Group.
    5. Options to instantiate multiple hosting mode - In Memory, Replication Group with Cluster Disabled, and Replication Group with Cluster Enabled.
    6. Example to integrate with AWS CloudWatch for the Redis slow logs.
  • Feature: Cross-Account Eventing

    Feature: Cross-Account Eventing

    Issue #11

    This provides an example of how to use CDK to build a cross-account event-driven communication pattern with SNS and SQS.

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • cdk app for ElastiCache

    cdk app for ElastiCache

    Issue #, if available:

    Description of changes:

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • Feature Request: OpenAPI document driven RestAPI Design in AWS CDK for Python/Typescript/C#

    Feature Request: OpenAPI document driven RestAPI Design in AWS CDK for Python/Typescript/C#

    General Information

    An API Gateway/Lambda Rest API is created in a stack using an OpenAPI definition file to define the API methods. This will include API Gateway request validators and Integration within the definition file. It will eliminate the need to define the API methods in the stack file. Example code will be available in Typescript and Python.

    Proposed Solution

    This solution provides sample code to the user that sets up a basic Lambda function, defines the OpenAPI definition file as an Asset API Definition an adds this definition to an API Gateway Instance.

    Language

    Typescript, Python, C#

    Other information

    No response

    Acknowledge

    • [X] I may be able to implement this feature request
    • [ ] This feature might incur a breaking change
  • Removed locked file

    Removed locked file

    Issue #, if available:

    Description of changes:

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • Bump minimist from 1.2.5 to 1.2.6 in /typescript/react-app

    Bump minimist from 1.2.5 to 1.2.6 in /typescript/react-app

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump minimist from 1.2.5 to 1.2.6 in /iis-smbshare-sqlserver/typescript

    Bump minimist from 1.2.5 to 1.2.6 in /iis-smbshare-sqlserver/typescript

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Security fix

    Security fix

    Issue E354398242

    Description of changes: Removed the cloud formation template as it is only used to test the cdk.

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • Diagram and README copy updates

    Diagram and README copy updates

    Description of changes: This is a minor update with an improved diagram and better verbiage in the README.

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

  • Bump decode-uri-component from 0.2.0 to 0.2.2 in /typescript/react-app

    Bump decode-uri-component from 0.2.0 to 0.2.2 in /typescript/react-app

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump vm2 from 3.9.7 to 3.9.11 in /typescript/react-app

    Bump vm2 from 3.9.7 to 3.9.11 in /typescript/react-app

    Bumps vm2 from 3.9.7 to 3.9.11.

    Release notes

    Sourced from vm2's releases.

    3.9.11

    New Features

    https://github.com/patriksimek/vm2/commit/58478a58c6f4af3c54faf4117ed5ab72d2cc8cd5: Add option require.strict to allow to load required modules in non strict mode.

    Fixes

    https://github.com/patriksimek/vm2/commit/d9a7f3cc995d3d861e1380eafb886cb3c5e2b873: Security fix.

    3.9.10

    New Features

    61d240f69cc02974be27c7582fee2defd0e6c7a8: Add uptime to process.

    Fixes

    e3e573fdc99a98a9c7db026e4c40474eb78cab4a: Security fix. 245da82dcdfa67031e065fd7c7a7348b5e21f2b8: Fix inspect showProxy.

    3.9.9

    Fixes

    5c2e13bbf0c0518e1958a4307982a999aa181049: Bump ECMA version to 2022.

    3.9.8

    Fixes

    777ffb0e021ef89444f215a69365a689d7051896: Fix access to some restricted function properties on non functions and fix findBestExtensionHandler not finding the best handler. 925e3e665acfa37dd3db0ea8e7f02b57277677e8: Try to return nicer parser errors.

    Changelog

    Sourced from vm2's changelog.

    v3.9.11 (2022-08-28)

    [new] Add option require.strict to allow to load required modules in non strict mode.
    [fix] Security fix.

    v3.9.10 (2022-07-05)

    [new] Add uptime to process.
    [fix] Security fix.
    [fix] Fix inspection with showProxy.

    v3.9.9 (2022-02-24)

    [fix] Bump parser ECMA version to 2022.

    v3.9.8 (2022-02-16)

    [fix] Add function type check for arguments, caller, and callee property check (GeoffRen)
    [fix] Fix find best extension handler

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump vite from 2.8.0 to 2.9.13 in /typescript/react-app

    Bump vite from 2.8.0 to 2.9.13 in /typescript/react-app

    Bumps vite from 2.8.0 to 2.9.13.

    Release notes

    Sourced from vite's releases.

    [email protected]

    Please refer to CHANGELOG.md for details.

    [email protected]

    Please refer to CHANGELOG.md for details.

    [email protected]

    Please refer to CHANGELOG.md for details.

    [email protected]

    Please refer to CHANGELOG.md for details.

    [email protected]

    Please refer to CHANGELOG.md for details.

    Changelog

    Sourced from vite's changelog.

    2.9.13 (2022-06-27)

    2.9.12 (2022-06-10)

    • fix: outdated optimized dep removed from module graph (#8534) (c0d6c60), closes #8534

    2.9.11 (2022-06-10)

    2.9.10 (2022-06-06)

    2.9.9 (2022-05-11)

    2.9.8 (2022-05-04)

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by vitebot, a new releaser for vite since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Feature Request: Cross-Account Eventing

    Feature Request: Cross-Account Eventing

    Description

    Two business systems need to be able to communicate using an event-driven pattern. The systems are hosted in separate AWS accounts. This example would use a combination of an SNS topic in Account A with an SQS queue in Account B. A resource policy will prevent any other source from publishing into the SQS queue.

    Architecture Diagram

    cross-account-eventing

    Language

    TypeScript

  • Deploy AWS infrastructure for traditional ASP .NET Applications with SQL Server Backend

    Deploy AWS infrastructure for traditional ASP .NET Applications with SQL Server Backend

    Description

    ASP .NET web applications typically run on Windows Servers and use SQL Server as backend. Many applications use windows file share for storing any long-term data associated with applications like logs, customer forms in pdf or other document formats. This CDK project set up a highly available infrastructure to deploy such applications with ease. 
    

    Architecture

    image

    Architecture Details

    VPC with following Subnets

    1. 2 Public Subnets in 2 different AZs
    2. 2 Private Subnet in 2 different AZs

    Managed Active Directory Domain setup with following details:

    1. New Active Directory Name : "example.corp.com"
    2. Domain Admin User : Admin, Password will be retrieved from AWS Secrets Manager
    3. New Domain User : "web-user", Password will be retrieved from AWS Secrets Manager
    4. Part of Private Subnet

    Windows File Share with following details:

    1. SMB File Share with backup
    2. DNS Alias "windows-share"
    3. Share Volume size is 100GB
    4. Added to domain "example.corp.com"

    Two Windows ec2 instances are setup with following details:

    1. The instance added to domain "example.corp.com"
    2. New Domain user called "web-user" created and added to Instance's Local Administrator Group.
    3. IIS with ASP .NET
    4. File share has been mounted at z:\ drive which web application can access
    5. Imports SSL certificate from S3 Bucket to Certificate Store, which can be used to configure SSL website in IIS
    6. If Autoscaling is enabled, new Autoscaling group gets created and both the instances get added to the group
    7. Basic website with index.html is hosted in port 80 and the same has been configured for health check with Target Group

    Application Load Balancer

    1. Placed in Public Subnet
    2. Configured with https listener if SSL Certificate is already imported into AWS Account
    3. Target Group gets created and configured as ALB's default routing target

    SQL RDS Instance

    1. Multi AZ instance with one primary and one secondary instance
    2. Admin password will be retrieved from AWS Secrets Manager
    3. Configured with BACKUP_RESTORE optional group to enable backup/restore data from S3 bucket

    Jump Server

    1. Linux server based on Amazon Linux
    2. Used to RDP to windows instances
    3. Used to connect SQL RDS from Sql Server Management Studio
Api-waf-example-cdk - Demo using sam to drive a CDK serverless api

CDK SAM Demo Demo using sam to drive a CDK serverless api Stack Setup go build -

Feb 5, 2022
Sample application managed with AWS CDK v2 (TypeScript).

honyakutter-ts This is an application that translates text entered in Japanese into English and tweets it, defined using AWS CDK v2 (TypeScript) and u

Dec 7, 2021
Http apis with AWS CDK for Go

Http apis with AWS CDK for Go Blog: https://harshq.medium.com/building-apps-with-aws-sdk-for-golang-api-gateway-and-lambda-b254858b1d71 Useful command

Jan 4, 2022
Terraform CDK aws Provider

Terraform CDK aws Provider

Jul 29, 2022
Integrate AWS EKS Anywhere cluster with AWS Services
 Integrate AWS EKS Anywhere cluster with AWS Services

This article provides step-by-step instruction on integrating AWS EKS Anywhere with AWS Services so the applications running on customer data center can securely connect with these services.

Mar 6, 2022
Create an ESK cluster using CDK and Golang.

Welcome to your CDK Go project! This is a blank project for Go development with CDK. NOTICE: Go support is still in Developer Preview. This implies th

Feb 14, 2022
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)

simples3 : Simple no frills AWS S3 Library using REST with V4 Signing Overview SimpleS3 is a golang library for uploading and deleting objects on S3 b

Nov 4, 2022
Apis para la administracion de notifiaciones, utilizando servicios como AWS SNS y AWS SQS

notificacion_api Servicio para envío de notificaciónes por difusión en AWS SNS Especificaciones Técnicas Tecnologías Implementadas y Versiones Golang

Jan 7, 2022
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

Dec 20, 2022
A package for access aws service using AWS SDK for Golang

goaws ?? A package for access aws service using AWS SDK for Golang Advantage with goaws package Example for get user list IAM with AWS SDK for Golang

Nov 25, 2021
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.

tutor-pet API Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure. Macro architecture: Code architecture: Pre-Re

Aug 17, 2022
Aws-parameter-bulk - Export AWS SSM Parameter Store values in bulk to .env files

aws-parameter-bulk Utility to read parameters from AWS Systems Manager (SSM) Par

Oct 18, 2022
Feb 7, 2022
Aws-cognito-demo-go - Source code for AWS Cognito in Go

AWS Cognito Demo in Go Source code for YouTube series, AWS Cognito in Go - https

Dec 10, 2022
Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

May 7, 2022
Support for Usagi API developed by @DanielaGC. The library is written in Go Lang

?? Usagi API - Wrapper This library is simple and easy to use and was developed entirely for Usagi API written in Go Lang. ??‍?? Example package main

Oct 18, 2021
A SDK development package developed in go language and connected to dechain

Platform introduction Dechain go SDK is a SDK development package developed in go language and connected to dechain. This SDK can be provided to go cl

Dec 14, 2021
To-Do list in GoLang with Redis as a backend -- Sample project for proof of concepts

?? GoLang To-Do List Sample App w/ Redis ?? Description A simple to-do list app written in GoLang with Redis as a backend showing a few GoLang feature

Dec 14, 2021