amazon-archives / aws-amplify-serverless-plugin

Plugin for the Serverless Framework to output AWS Amplify configuration files.
Apache License 2.0
124 stars 30 forks source link

Choose the identity pool that corresponds to the requested app client #47

Closed fmauquie closed 5 years ago

fmauquie commented 5 years ago

Description of changes: I have multiple identity pools that correspond to each of my user pools. The identity pool that was selected was always the first one, which causes problems with S3 authentication in Amplify. This change selects the identity pool that corresponds to the computed app client ID, and reverts to the old behavior if none is found.

I have verified that it works for me on TS generation, but I don't know how to run local tests (I'll see if CI fails once the PR is submitted).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

adrianhall commented 5 years ago

Looks good and a great addition to the codebase - thanks! However, there is a little bit of error condition handling to do. I would appreciate you adding and testing the suggested fix prior to the merge. If you don't get to it in the next couple of days, I'll merge and do the error condition fix.

adrianhall commented 5 years ago

No worries on the changes - I'll fix them prior to release.