Skip to content

doritoes/ipgiraffe.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipgiraffe.com

How ipgiraffe.com was built on AWS Lambda.

Overview and Genesis

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

Project Goals

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.

In Scope

Completed

  • 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

Might Do

  • Create another site based on GCP serverless computing
  • Create another site based on Azure serverless computing

Out of Scope

  • 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

Step-by-Step

  1. Pre-Requisites
  2. Create Lambda Function
  3. Create API Gateway
  4. Create CloudFront
  5. Update DNS
  6. Testing and Monitoring
  7. Adding Regions
  8. Next Steps

References

My favorite IP address checking web sites:

More "IP Animals":

My IP address checking web sites:

My other web sites:

To find your private LAN IP address:

About

How ipgiraffe.com was built on AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published