DataStore cannot connect to model's sync subscriptions (AWS_LAMBDA auth type) #3549
Labels
bug
Something isn't working
contribution
Community contribution PRs
datastore
Issues related to the DataStore category
follow up
Requires follow up from maintainers
Describe the bug
For some of our models we are using AWS_LAMBDA auth type. ( e.g. 'HomeModel')
Every operation on this model is authorized by our custom lambda including onCreate, onUpdate and onDelete subscriptions requests.
Currently Amplify just sends request to subscribe to HomeModel (without filter/predicate) and our lambda cannot authorize this.
Instead Amplify should add DataStore syncExpressions as request's filter, e.g. subscribe to HomeModel onCreate events where HomeModel.address is equal to 'myAddress'
Steps To Reproduce
Expected behavior
DataStore add syncExpressions as subscriptions request filter
Amplify Framework Version
2.27.0
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5
CLI version
10.3.1
Xcode version
Version 15.2 (15C500b)
Relevant log output
The text was updated successfully, but these errors were encountered: