Open
Description
Describe the bug
Upon entitlement update (e.g. change my the subscriber/customer), there is no message on the SupportSNS topic.
To Reproduce
Steps to reproduce the behavior:
- set up everythin
- Buy the product from a test account
- later, edit the product dimensions from the test account
Expected behavior
The "entitlement-updated" message should be sent to the SupportSNS topic
More details
At this part, it continues only if both old and new "entitlement" entry are present, and they must differ.
https://github.com/aws-samples/aws-marketplace-serverless-saas-integration/blob/master/src/grant-revoke-access-to-product.js#L44-L46
But upon change of dimensions, there are two Changes done to the DynamoDB:
- https://github.com/aws-samples/aws-marketplace-serverless-saas-integration/blob/master/src/register-new-subscriber.js#L75-L104 writes a Put to DynamoDB without the "entitlement" field set. That Stream Message will not have it in the "new" object. Then it sends to the Entitlement Topic.
- that triggers https://github.com/aws-samples/aws-marketplace-serverless-saas-integration/blob/master/src/entitlement-sqs.js#L31-L45, it writes an Update to the DynamoDB. That Stream Message will not have it in the "old" object.
So in neither case, both "old" and "new" object will have the entitlement, so "grant-revoke-access-to-product" will not send a message to the SupportSNS topic.
Metadata
Metadata
Assignees
Labels
No labels