A serverless URL shortening service (think btly.com or tinyurl.com ) that runs on AWS.
This is a sample project demonstrating serverless deployment and testing. It is functional, but not fully-featured.
This project uses a dev Docker image to package all its dependencies.
To build the lambdas run
./run steps/build
To deploy the full application run
./run steps/deploy
By default the application will be deployed using your default AWS profile. You may specify a different profile using an environment variable:
AWS_PROFILE=my_profile ./run steps/deploy
Unittests may be run with
./run steps/test
For an integration test in AWS run
./run steps/integration
Shorten a URL:
$ curl -v -H 'Content-Type: application/json' https://${API_HOSTNAME}/new --data-ascii '{ "url": "https://twitter.com" }'
{"shortUrl":"https://<SERVICE_URL>/b190QQ"}
Follow a short URL:
curl "https://<SERVICE_URL>/b190QQ
- Cloudfront for caching and easy name aliasing
- Friendly web UI for shortening URLS