How ipgiraffe.com was built on AWS Lambda.
After pondering on what would make a good example use case for a Lambda instance, I decided on the simplest use case I could think of. Drawing on inspiration from ipturtle and ipchicken, I decided on very simple site that returns the user's IP address. Frequently, I need a client to provide their public IP address. There are many sites loaded with ads. And some make it difficult to find the IP address! I often direct people to ipchicken or ipdragon. Now I can offer a simpler alternative!
This demonstration site has the following features:
- No ads
- Single function with no external images, scripts, or stylesheets (there is one Google font that is loaded in the browser)
- Just the IP address, no extra information
- Extremely cheap to operate (there aren't any logs we have to store to a S3 bucket) This breaks the mold of the typical Lambda use case
- Does not return JSON, but instead HTML
- Not an API with an authentication backend
Here are the goals I have for this project. If you would like to encourage me to add additional goals or to complete these goals, I'm open to contributions to pay my Cloud bills.
- Lambda function returns HTML
- Returns the source IP address
- Configured API Gateway
- Configured domain name
- Configured CloudFront including SSL certificate
- When proxied by CloudFront or other proxies, leverage X-Forwarded-For headers to show the client's IP address
- Apply giraffe-themed styling to the page
- Base-64 in-page image of a giraffe
- Added HTML comments to the source code
- Created and tested example lambda functions in 7 languages running a variety of runtimes
- Converted to Route 53 load balancing and removed CloudFront
- Create another site based on GCP serverless computing
- Create another site based on Azure serverless computing
- The original goal of deploying the Lambda function, distributed API Gateways, and CloudFront configurations using CloudFormation is now out of scope due to the limitations of AWS to meet my specific needs
- Pre-Requisites
- Create Lambda Function
- Create API Gateway
- Create CloudFront
- Update DNS
- Testing and Monitoring
- Adding Regions
- Next Steps
My favorite IP address checking web sites:
- https://ipgoat.com
- https://ipchicken.com
- http://icanhazip.com (just the IP address, great from command line:
curl http://icanhazip.com
) - https://api.ipify.org/ (another bare IP address service)
- http://www.ipdragon.com
- http://ipturtle.com
- https://ip.me
- https://whatismyip.org/
More "IP Animals":
- https://ipmonkey.com
- https://ipfish.com (redirects to ipchicken.com)
My IP address checking web sites:
My other web sites:
- https://unclenuc.com
- https://systems-monitor.com/
- https://www.cottagewifi.com/ (I have a lot of content that I want to share there)
To find your private LAN IP address: