Skip to content

ProdigiNET/cdk-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform CDK Project 🚀

Pre-requisites

  1. An aws account is required
  2. AWS CLI needs to be installed on our system MAC OSX pkg
  3. Set up the aws cli with your aws account
  4. Learn about CDK Video Tutorial/Example by Nader Dabit

Usage

Before beginning CDK development, in order to do the synths and diffs and deploys, you first need to bootstrap.

npm run bootstrap # for Test env
npm run bootstrap:prod # for Prod env

After bootstraping you are free to use CDK as you please, but whenever you need to switch Environments you need to remember to re-bootstrap for that environment.

Deploy Test:

npm run deploy TheStackName # Deploys single stack
npm run deploy:all # Deploys all stacks
npm run d:a # Deploys all stacks

Deploy Prod:

npm run deploy:prod TheStackName # Deploys single stack
npm run deploy:prod:all # Deploys all stacks
npm run d:p:a # Also deploys all stacks

Diff Test:

npm run diff

Diff Prod:

npm run diff:prod

Gotcha's

CDK Pipeline issues | Docker too many requests

Error

fail: docker build

too many requests: Rate exceeded

We were recieving this error because we were pulling docker images from the public repository at too frequent a rate.

To solve this we wanted to cache images in our private ECR repository and then referrence them in our docker files eg:

FROM --platform=linux/amd64 460727315916.dkr.ecr.us-west-1.amazonaws.com/ecr-public/lambda/nodejs:16.2022.08.17.10

In order to allow the CDK iam role which is assumed during our pipeline to access our own ECR registery we manually updated the auto generated policy for the cdk generated iam role... from only having access to the prive CDK generated repository to all of our private repositories which inlcude our pull through caches.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors