diff --git a/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts b/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts index 45d7416db..ef1b45466 100644 --- a/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts +++ b/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts @@ -114,11 +114,6 @@ export class CaptureProxyStack extends MigrationServiceCore { const servicePolicies = props.streamingSourceType === StreamingSourceType.AWS_MSK ? createMSKProducerIAMPolicies(this, this.partition, this.region, this.account, props.stage, props.defaultDeployId) : [] - const brokerEndpoints = getMigrationStringParameterValue(this, { - ...props, - parameter: MigrationSSMParameter.KAFKA_BROKERS, - }); - const destinationEndpoint = getDestinationEndpoint(this, props.destinationConfig, props); let command = "/runJavaWithClasspath.sh org.opensearch.migrations.trafficcapture.proxyserver.CaptureProxy" @@ -129,6 +124,10 @@ export class CaptureProxyStack extends MigrationServiceCore { command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--listenPort", "9200") command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--sslConfigFile", "/usr/share/elasticsearch/config/proxy_tls.yml") if (props.streamingSourceType !== StreamingSourceType.DISABLED) { + const brokerEndpoints = getMigrationStringParameterValue(this, { + ...props, + parameter: MigrationSSMParameter.KAFKA_BROKERS, + }); command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--kafkaConnection", brokerEndpoints) } if (props.streamingSourceType === StreamingSourceType.AWS_MSK) {