@@ -26,7 +26,6 @@ import * as sqs from 'aws-cdk-lib/aws-sqs';
2626import * as sfn from 'aws-cdk-lib/aws-stepfunctions' ;
2727import * as sfnTask from 'aws-cdk-lib/aws-stepfunctions-tasks' ;
2828import { Construct } from 'constructs' ;
29- import * as appsyncMergedApi from '../../../common/helpers/appsyncmergedapi-helper' ;
3029import * as eventBridge from '../../../common/helpers/eventbridge-helper' ;
3130import * as redisHelper from '../../../common/helpers/redis-helper' ;
3231import * as s3BucketHelper from '../../../common/helpers/s3-bucket-helper' ;
@@ -190,21 +189,21 @@ export class SummarizationAppsyncStepfn extends Construct {
190189 /**
191190 * Returns an instance of events.IEventBus created by the construct
192191 */
193- public readonly eventBridgeBus : events . IEventBus | undefined ;
192+ public readonly eventBridgeBus : events . IEventBus ;
194193 /**
195194 * Returns an instance of appsync.CfnGraphQLApi for merge api created by the construct
196195 */
197- public readonly mergeApi : appsync . CfnGraphQLApi | undefined ;
196+ public readonly mergeApi : appsync . CfnGraphQLApi ;
198197
199198 /**
200199 * Returns an instance of appsync.CfnGraphQLApi for summary created by the construct
201200 */
202- public readonly summaryGraphqlApi : appsync . IGraphqlApi | undefined ;
201+ public readonly summaryGraphqlApi : appsync . IGraphqlApi ;
203202
204203 /**
205204 * Returns an instance of redis cluster created by the construct
206205 */
207- public readonly redisCluster : elasticache . CfnCacheCluster | undefined ;
206+ public readonly redisCluster : elasticache . CfnCacheCluster ;
208207
209208 /**
210209 * Returns the instance of ec2.IVpc used by the construct
@@ -218,12 +217,12 @@ export class SummarizationAppsyncStepfn extends Construct {
218217 /**
219218 * Returns the instance of s3.IBucket used by the construct
220219 */
221- public readonly inputAssetBucket : s3 . IBucket | undefined ;
220+ public readonly inputAssetBucket : s3 . IBucket ;
222221
223222 /**
224223 * Returns the instance of s3.IBucket used by the construct
225224 */
226- public readonly processedAssetBucket : s3 . IBucket | undefined ;
225+ public readonly processedAssetBucket : s3 . IBucket ;
227226
228227 /**
229228 * Logging configuration for AppSync
@@ -330,7 +329,7 @@ export class SummarizationAppsyncStepfn extends Construct {
330329 } ) ;
331330 redisHelper . setInboundRules ( redisSecurityGroup , this . securityGroup ) ;
332331 } else {
333- this . redisCluster = props ?. existingRedisCulster ;
332+ this . redisCluster = props ?. existingRedisCulster ! ;
334333 }
335334
336335 const redisHost = this . redisCluster ?. attrRedisEndpointAddress ! ;
@@ -344,16 +343,6 @@ export class SummarizationAppsyncStepfn extends Construct {
344343 eventBusProps : props . eventBusProps ,
345344 } ) ;
346345
347-
348- appsyncMergedApi . checkAppsyncMergedApiProps ( props ) ;
349-
350- const appsyncServicePrincipleRoleName = 'appsync.amazonaws.com' ;
351-
352- const mergeApiRole = new iam . Role ( this , 'mergedapirole' + stage , {
353- assumedBy : new iam . ServicePrincipal ( appsyncServicePrincipleRoleName ) ,
354- } ) ;
355-
356-
357346 this . mergeApi = props . existingMergeApi ;
358347
359348 const mergeApiId = this . mergeApi . attrApiId ;
@@ -406,25 +395,6 @@ export class SummarizationAppsyncStepfn extends Construct {
406395 const updateGraphQlApiId = ! mergeApiId ? summarizationGraphqlApi . apiId : mergeApiId ;
407396
408397
409- // associate source api with merge api
410- const sourceApiAssociationConfigProperty :
411- appsync . CfnSourceApiAssociation . SourceApiAssociationConfigProperty = {
412- mergeType : 'AUTO_MERGE' ,
413- } ;
414-
415- const sourceApiAssociation = new appsync . CfnSourceApiAssociation ( this ,
416- 'sourceApiAssociations' + stage ,
417- {
418- mergedApiIdentifier : mergeApiId ,
419- sourceApiAssociationConfig : sourceApiAssociationConfigProperty ,
420- sourceApiIdentifier : summarizationGraphqlApi . apiId ,
421- } ) ;
422-
423- sourceApiAssociation . node . addDependency ( summarizationGraphqlApi ) ;
424-
425- // update merge api role with access
426- appsyncMergedApi . setMergedApiRole ( mergeApiId , summarizationGraphqlApi . apiId , mergeApiRole ) ;
427-
428398 // Lambda function to validate Input
429399 const inputValidatorLambda =
430400 new lambdaFunction . DockerImageFunction ( this , 'inputValidatorLambda' + stage ,
0 commit comments