1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
If you want to use S3, I think you can store orders that belong to a customer in a folder based on customer ID. e.g.,
your-bucket/ customer1/ order1.json order2.json customer2/ order3.json
and run ListBucket('your-bucket', 'customer1') to get all orders for a specific customer.
However, if possible, I would prefer store order data in NoSQL database (e.g., DynamoDB) with the customer ID set as a primary key.
répondu il y a 7 mois
Contenus pertinents
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Thanks - that's a good idea. However - how do I link the caller with the customer Id's?
Generally, a customer ID should be able to retrieved from its authentication token. For example, if you use Congito User Pool as an user authentication service, you should decode the request sender's ID token which can be retrieved from Lambda input context.identity.cognitoIdentityId. The decoded ID token should look like this:
Then you can decide that the authenticated request sender has the customer ID
customer1
.