Android 如何通过api网关https请求更新Cognito Sync用户数据
我正在开发android应用程序 在其中,我使用AmazonCognito及其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
// 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更新数据集的示例,请参见