Serverless AMP solution on AWS

Artūrs Krūze
Mar 19, 2018 · 4 min read

It all started when we realized our website gets outdated very fast and we are always so busy with our customers we forget about ourselves. We had to build something amazing .

In case you are not familiar with the terms serverless, AMP and AWS — click on the words and learn more.

The technical

Serverless AMP solution on AWS

The above is just the infrastructure part. The website still needs to be generated, deployed etc. For that we used what we call the generator.

It is a system built on Laravel which is a regular non-serverless site with 1 extra feature — generating the website frontend code. The generator also takes in the standard (non-AMP, non-minified) code and makes it fully AMP and minimized to the limits. In the end we have a fast lightweight site ready to be deployed.

The deployments are automated with Jenkins. From generation and file uploads to cache invalidations — all done with a single click.

The visual

There were a lot of tricky parts where we understand that with javascript it would be easy but with CSS only it is tough to do. Also, there are different sizing limits (also for CSS) so we had to work hard to keep the styles size tiny. Despite all that we made all the functionality and look as per designs. There was no place where we gave up and went with a simpler solution.

The amazing

3 points lost because of AMP requirements :(

It’s a pitty that AMP doesn’t allow to host AMP js file elsewhere or have proper cache headers. This is the only reason we couldn’t reach 100/100 in Google PageSpeed. Changing the AMP js host to our CDN gives 100 points but throws a console error that the AMP source is not Google’s. Sad, but we’re still happy we reached the maximum possible score with AMP.

Another amazing fact is that the engagement and visibility in Google search grew in a lightning speed after the launch of this AMP website. The average time on site for users doubled (from ~1 minute to ~2 minutes) and our tracked keyword visibility jumped from 0.5% to 8% — that’s 16x more than we had without the AMP site.

We’re ready for new challenges

Check out the site mentioned in this post — magebit.com or just shoot us an email to info@magebit.com.


About Magebit

Enterprise eCommerce solutions on Magento platform. At Magebit we are providing services to clients all over the world — from USA to Australia, China and back to Europe. With certified Magento enthusiasts on board we create the paramount solutions for small businesses as well as large enterprises.

Feel free to shoot us a message to info@magebit.com or learn more about what we offer at magebit.com.

Magebit

Enterprise eCommerce solutions built on Magento

Artūrs Krūze

Written by

Magento, AWS

Magebit

Magebit

Enterprise eCommerce solutions built on Magento