in infra/lib/infra-stack.ts [29:90]
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props)
// The code that defines your stack goes here
const storage = new StorageConstruct(this, "storage");
const jsWebApp = new WebAppConstruct(this, "js-web-app", {
webBucket: storage.webBucket
})
const identity = new IdentityConstructs(this, "identity", {
cfJsWebApp: jsWebApp.cfWeb,
trainingBucket: storage.trainingBucket
})
const topics = new SnsConstruct(this, 'topics', {groundTruthRole: identity.groundTruthRole})
const workteams = new WorkteamConstruct(this, "workteams", {
cognitoUserPool: identity.userPool,
cognitoAppClient: identity.labellersClient,
labellersTopic: topics.labellersTopic,
labellersGroup: identity.labellersGroup,
trainingBucket: storage.trainingBucket
})
const param_store = new ParamStoreConstruct(this, "parameters", {})
const api = new ekycApiConstruct(this, "ekyc-api", {
trainingTable: storage.trainingTable,
storageBucket: storage.storageBucket,
trainingBucket: storage.trainingBucket,
sessionsTable: storage.sessionsTable,
verificationHistoryTable: storage.verificationHistoryTable,
cognitoUserPool: identity.userPool,
cognitoAppClient: identity.userPoolClient,
dataRequestsTable: storage.dataRequestsTable,
approvalsTopic: topics.approvalTopic,
RekognitionCustomLabelsProjectArnParameter:param_store.rekognitionCustomLabelsProjectArn,
RekognitionCustomLabelsProjectVersionArnParameter: param_store.rekognitionCustomLabelsProjectVersionArn,
jsCloudFrontDistribution: jsWebApp.cfWeb,
workTeam: workteams.labellersWorkTeam,
groundTruthRole: identity.groundTruthRole,
useFieldCoordinatesExtractionMethodParameter:param_store.useFieldCoordinatesExtractionMethod
})
const events = new EventConstructs(this, 'event-triggers',
{
RekognitionCustomLabelsProjectArnParameter:param_store.rekognitionCustomLabelsProjectArn,
RekognitionCustomLabelsProjectVersionArnParameter: param_store.rekognitionCustomLabelsProjectVersionArn,
trainingTable: storage.trainingTable,
trainingBucket: storage.trainingBucket
})
new cdk.CfnOutput(this, "DeploymentRegion", {
value: Stack.of(this).region,
description: "The region that this stack has been deployed in.",
exportName: "deploymentRegion",
});
}