Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何通过api网关https请求更新Cognito Sync用户数据_Android_Amazon Web Services_Amazon Cognito_Aws Api Gateway - Fatal编程技术网

Android 如何通过api网关https请求更新Cognito Sync用户数据

Android 如何通过api网关https请求更新Cognito Sync用户数据,android,amazon-web-services,amazon-cognito,aws-api-gateway,Android,Amazon Web Services,Amazon Cognito,Aws Api Gateway,我正在开发android应用程序 在其中,我使用AmazonCognito及其sync来存储用户信息 // Initialize the Cognito Sync client CognitoSyncManager syncClient = new CognitoSyncManager( getApplicationContext(), Regions.AP_NORTHEAST_1, // Region credentialsProvider); // Create a re

我正在开发android应用程序

在其中,我使用AmazonCognito及其sync来存储用户信息

// Initialize the Cognito Sync client
CognitoSyncManager syncClient = new CognitoSyncManager(
   getApplicationContext(),
   Regions.AP_NORTHEAST_1, // Region
   credentialsProvider);

// Create a record in a dataset and synchronize with the server
Dataset dataset = syncClient.openOrCreateDataset("myDataset");
dataset.put("myKey", "myValue");
dataset.synchronize(new DefaultSyncCallback() {
    @Override
    public void onSuccess(Dataset dataset, List newRecords) {
        //Your handler code here
    }
});
但我的问题是我需要一个HTTP回发URL,通过它我可以传递一些数据,并在Cognito sync数据中更新

为此,我考虑使用AmazonAPI网关进行HTTP请求

你能告诉我有没有办法通过API网关更新Cogniti sync数据,或者我需要Lamda和Dymamodb的帮助

您需要直接从Lambda函数使用,以便从API进行这些更新。您需要首先使用获取数据集的内容,然后更新它。数据更新后,android客户端将能够使用
同步
方法正常获取更新的数据

有关使用Java更新数据集的示例,请参见