aws-samples / retail-demo-store

AWS Retail Demo Store is a sample retail web application and workshop platform demonstrating how AWS infrastructure and services can be used to build compelling customer experiences for eCommerce, retail, and digital marketing use-cases
MIT No Attribution
727 stars 516 forks source link

Refactor users service from go to python #596

Open Adibuer-lab opened 5 months ago

Adibuer-lab commented 5 months ago

Issue #, if available: #13 Description of changes: Refactor users service from go to python

  1. New users service created under users folder with old go based service moved to users-old for reference during PR
  2. Changed from in-memory storage of users to using dynamodb
  3. Updated cloudformation templates to deploy users dynamodb table with appropriate permissions for users service to access table
  4. Added custom resource and lambda function to load users table with shoppers during deployment of retail demo store
  5. append unique string to cloudfront request policies

Description of testing performed to validate your changes (required if pull request includes CloudFormation or source code changes): Integration testing using testing scripts and tested by deploying into aws account

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Adibuer-lab commented 5 months ago

@gfaires nice thanks! I'll look into each one, 1 by 1 and respond

Adibuer-lab commented 5 months ago

@gfaires ready for review again. Sorry for wait, wanted to make the auto-select shopper and select shopper based on persona and age faster, but pynamodb didn't support sort key queries on GSI's. Ended up reverting to flask, and base dynamodb api's. but now things are much faster, for example testing script which used to run through all endpoints in 3 seconds does it in 0.8 now