Closed n8o closed 9 months ago
I got something mixed up in my testing. Resolved my issue using the following:
ServiceConfiguration serviceConfiguration = const BaseServiceConfiguration(omitSessionToken: true);
var signed = signer.presignSync(request, credentialScope: scope, expiresIn: Duration(hours: 1), serviceConfiguration: serviceConfiguration);
var finalParams = signed.query;
return '$scheme$endpoint$urlPath?$finalParams';
Description
I'm using AWSSigV4Signer to generate a pre-signed Uri to pass to mqtt_client in order to connect to IOT Core using MQTT over WebSockets.
AWSSigV4Signer.presignSync()
doesn't return a sorted query string that matches the signed sorted and hashed string in the STS.Categories
Steps to Reproduce
Using the following packages: aws_signature_v4: ^0.5.1 aws_common: ^0.6.3
Sample Code:
this returns a Uri with query params out of order.
Work Around: Update
presignSync
to returnAWSSignedRequest
. Then I can manually create the correct uri.Screenshots
No response
Platforms
Flutter Version
3.16.9
Amplify Flutter Version
1.6.1
Deployment Method
Custom Pipeline
Schema
No response