Issue
I'm developing an Android app with React Native and I have ran into a problem with S3. I'm running the app on an emulator, and trying to download a file through a presigned URL from localstack. I've tried to do so with RNFS and RNFetchBlob, none of them worked. With both libs, S3 gives this message:
Presign signature calculation failed: <Response [403]>
I'm sending my request to 10.0.2.2:4566 instead of 127.0.0.1:4566, because the app can't connect to the latter (because it runs on an emulator).
I can access the URL through my browser, but I can't make it work on the emulator. What am I missing?
Solution
Finally figured it out. I had to configure on the backend that localstack should use my PC's IP, and access the files on the Emulator through that. This way the GET request is successful.
# AWS - localstack
aws.endpoint.url = http://192._._._:4566
Answered By - tatra4life
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.