Recently, I really wanted to find a way to build an API that would take in a URL and save a screenshot.
My initial use case was simple: if I was analyzing phishing emails, I wanted an easy way to get a screenshot of the URL that the email was trying to direct their targets to.
To build this, I used Terraform to create all of the infrastructure necessary to set it up in AWS, using Selenium, chromedriver, and headless Chrome to obtain the screenshots.
High level diagram illustrating what will be built in AWS by Terraform
Note: All code samples are from PowerShell, so please excuse the “.” notation.
Create your new directory and initialize Terraform like this:
mkdir .\screenshot-service
cd .\screenshot-service
.\terraform init
#terraform #aws #api #developer