dshop
dshop copied to clipboard
AWS container compliance - SES integration
Addresses #1011.
See related PR: #1029
If a shop admin deploys DShop from an Amazon EC2 instance, the app will now refrain from requesting the admin's AWS credentials in the Super Admin network config page. If and when the admin attempts to connect the app to their AWS SES account, the app will try to establish a connection using the EC2 "instance metadata service".
Front end UI testing
https://user-images.githubusercontent.com/10854442/154044666-08833b21-a900-4495-a5ea-8b6f8577854c.mov
Testing methodology
- Build a DShop Amazon Machine Image (AMI) using the scripts here
- Launch an EC2 instance from the AMI
- [Option] Attach an IAM role to the instance to allow DShop to send emails via AWS SES programatically
- SSH into the instance and run
//Launch a bash shell as the user 'dshop
sudo -u dshop bash
cd /app/dshop/shop
git config --global user.name "<valid_git_username>"
git config --global user.email "<email_id_of_the_git_account>"
git pull
git checkout aws-ses-marketplace-compliance
//Manually add a .env file for testing
echo "AWS_MARKETPLACE_DEPLOYMENT=true" >> .env
yarn run build:dist
cd ../backend && pm2 restart app.js
- Navigate to the DShop Admin console on a web browser and test that a) The fields AWS Access Key and AWS Secret Access Key are hidden b) The user can connect to AWS SES without inputting credentials on both the Super Admin and Admin interfaces