Created
December 12, 2022 21:16
-
-
Save fsanal/6c527154cd292f99c36b432d0732b1fb 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
private void createMobileCollectionResource(RestApi api, String platformResourceName) { | |
Resource mobileResource = api.getRoot().addResource(platformResourceName); | |
KinesisPipeline pipeline = createKinesisPipeline(platformResourceName); | |
kinesisPipelines.add(pipeline); | |
AnalyticsEventProcessor processor = AnalyticsEventProcessor.Builder.create(this, | |
String.format("Analytics%sEventProcessor", capitalize(platformResourceName))) | |
.platformName(platformResourceName) | |
.stream(pipeline.getStream()) | |
.lambdaExecutionRole(awsLambdaAnalyticsExecution) | |
.routingLambda(routingLambda) | |
.reprocessingLambda(reprocessingLambda) | |
.build(); | |
lambdaDlqTopics.add(processor.getDlqTopic()); | |
Resource batch = mobileResource.addResource("batch"); | |
attachStreamResourceMethods(batch, platformResourceName, "PutRecords", false); | |
Resource sourceConfig = mobileResource.addResource("sourceConfig"); | |
sourceConfig.addMethod("GET", | |
createSourceConfigMockIntegration(false), | |
createMethodOptions(false) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment