Use AWS SDK
If you need functionality in the AWS services used by the Amplify Predictions category that isn't available, we provide an escape hatch so you can get a reference to that service. For example, to get a reference to AmazonRekognitionClient
:
1// Obtain reference to the plugin2AWSPredictionsPlugin predictionsPlugin = (AWSPredictionsPlugin)3 Amplify.Predictions.getPlugin("awsPredictionsPlugin");4AWSPredictionsEscapeHatch escapeHatch = predictionsPlugin.getEscapeHatch();5
6// Send a new request to the Rekognition endpoint directly using the client7AmazonRekognitionClient client = escapeHatch.getRekognitionClient();8CreateCollectionRequest request = new CreateCollectionRequest()9 .withCollectionId("<new-collection-id-here>");10client.createCollection(request);
API Documentation Resources