Created
December 12, 2022 21:21
-
-
Save fsanal/0f708d40a2a821956ca5a178b5489125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public AnalyticsEventProcessor(final Construct scope, final String id, final AnalyticsEventProcessorProps props) { | |
super(scope, id); | |
platformName = props.getPlatformName(); | |
stream = props.getStream(); | |
lambdaExecutionRole = props.getLambdaExecutionRole(); | |
routingLambda = props.getRoutingLambda(); | |
reprocessingLambda = props.getReprocessingLambda(); | |
if (Objects.equals(System.getenv("CDK_ENVIRONMENT"), "production")) { | |
environmentVars.put("TEST_WRITE_KEY_ALIAS", String.format("%s_dev", platformName)); | |
environmentVars.put("WRITE_KEY_ALIAS", String.format("%s_prod", platformName)); | |
} else { | |
environmentVars.put("TEST_WRITE_KEY_ALIAS", String.format("%s_testing", platformName)); | |
environmentVars.put("WRITE_KEY_ALIAS", String.format("%s_testing", platformName)); | |
} | |
dlq = createDlq(); | |
sourceQueue = createSourceQueue(); | |
dlqTopic = createDlqTopic(); | |
routingFunction = createRudderstackRoutingLambda(); | |
reprocessingFunction = createRudderstackReprocessingLambda(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment