My kid's daycare is always texting me for more diapers and greek yogurt for my 2 year-old son. I wanted to give them a button to click so an order of yogurt/diapers would ship to the daycare.
Amazon sells click-and-order "Dash" buttons for certain products, but not the items I wanted. I ordered a $10 AWS IoT button on Amazon and programmed it to start/stop an EC2 instance, which would, upon every boot, run a headless browser session written in Ruby that would visit Amazon.com, log in, order the items, check out, and log out.
- Button: 1st gen AWS IoT button, set to trigger a Lambda job (Python 2.7)
- EC2: Ubuntu Xenial (16.04) on a t2.micro instance
- Packages: Ruby 2.4, Selenium Webdriver, ChromDriver, Xvfb
- Launch and configure EC2 Ubuntu instance to successfully run browser scripts upon boot.
- Use a t2.micro instance on AWS free tier
- Replace the default
rc.local
file with the one in this repo - Add the
place_order.rb
file to the/ubuntu/home
directory - Copy the ARN to use in Step 3
- Configure button to WiFi network.
- Create Lambda function to boot instance, wait for scripts to run, then stop instance, and set IoT button as the trigger.
- Instructions here
- Create Lambda function to boot the instance (use ARN from Step 1) and set IoT button as the trigger.
- Click the button, wait, then check your Amazon cart. Presto!
In order to contribute, clone the repository https://github.com/fordprior/order-anything-button and create a pull request after submitting your changes