This package encompasses CloudKitect Components designed according to the Well Architected framework, featuring pre-integrated compliance standards like PCI, MAS, NIST4, ARP, GDPR, and more. To gain access to these CloudKitect Components, customers are required to complete an on-boarding process. During the on-boarding procedure, customers are requested to provide their AWS account ID for inclusion in the CloudKitect managed AWS CodeArtifact repository. To initiate the on-boarding process and utilize the CloudKitect Components in your projects, please contact us at info@cloudkitect.com
After on-boarding customer will update npm config file to use CloudKitect managed AWS Code Artifactory as their npm registry
Edit .npmrc file to add the following entry
registry=https://cloudkitect-ACCOUNT_ID.d.codeartifact.us-east-1.amazonaws.com/npm/cloudkitect-artifacts/
Then AWS cli needs to be configured with credentials for the customer AWS Account used for on-boarding
aws configure --profile npmregistry
Then use the following command to login to CloudKitect managed AWS Code Artifactory
aws codeartifact login --tool npm --domain cloudkitect --domain-owner ACCOUNT_ID --repository components-artifacts --profile npmregistry
Once the login is successful, you can create a new CDK project by running the following commands
cdk init app --language typescript
This will create a bare bone CDK project.
Open CDK project in your favorite IDE and goto package.json file to add the WA-CDK dependency
{
"dependencies": {
"@cloudkitect/components": "CURRENT_VERSION"
}
}
Once package.json file is updated, you can install the dependencies by running the following commands
npm install
Now that you have all the constructs available from CloudKitect Components, use them just like any other CDK constructs.
For example the below code snippet we are using CkBucket that extends the Bucket construct provided by AWS CDK
import {CcBucket} from "./ck-bucket";
new CkBucket(this, "MyBucket", {})
Make sure you have the following installed locally
You can also use docker superchain if it has all the required packages, current version is on older .NetCore (3.1)
docker run -it --rm --entrypoint sh -v $(pwd)/components:/components jsii/superchain:1-buster-slim-node16
npm run jsii-build
In order to build packages each language has a different configuration setup to use CloudKitect codeartifact as its repository source.
aws codeartifact login --tool dotnet --domain cloudkitect --domain-owner 175815161984 --repository cloudkitect-artifacts --region us-east-1 —profile repo
aws codeartifact login --tool pip --domain cloudkitect --domain-owner 175815161984 --repository cloudkitect-artifacts --region us-east-1 --profile repo
Currently, there is no way to configure Maven to talk to codeartifact, logged a bug with JSII packmak project
aws codeartifact login --tool npm --domain cloudkitect --domain-owner 175815161984 --repository cloudkitect-artifacts --region us-east-1 --profile repo
After all the logins are successful you can run the following command to create packages.
npm run package
Run the following script, once the packages are build in dist folder, update the version in the script
./publish-java.sh
Run the following script, once the packages are build in dist folder, update the version in the script
./publish-nuget.sh
Run the following script, once the packages are build in dist folder, update the version in the script
./publish-pypi.sh
./publish-js.sh
For some reason the following script did not work for NPM, I had to put in AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN and AWS_ACCESS_KEY_ID and then ran the
npx publib-npm
The version of all CDK packages are fixed to the same version. If an upgrade is desired, please make sure that all CDK packages are upgraded to the same version at the same time. Different versions of CDK mixed in the project may cause type incompatibilities.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsGenerated using TypeDoc