New Launch

Take a deep dive into the fastest Gatsby, yet: Gatsby 5!

ContactSign Up for Free

Using Gatsby Cloud Builds With AWS S3

Sam Bhagwat
July 23rd, 2022

Occasionally our team will run into calls where we hear engineers say, “We want the build speed, content authoring workflow, and CMS preview that Gatsby Cloud offers, but we can’t consider this solution because we’ve been mandated that our cloud infrastructure be hosted on AWS.”

Luckily for you, we still support this use case!

Your engineering organization can still reap the benefits of Gatsby if they use Gatsby for the build and preview experience and then send the build to AWS for hosting—win-win scenario if you ask us! 

With this workaround, your content team can preview and publish build runs in seconds with the development team no longer having to manage the staging environment for preview! Bonus: your engineering team can comply with organization policies to host in their approved AWS environment.

Here’s how this works. Basically, you can build your Gatsby site in Gatsby Cloud and deploy to S3 as a third-party hosting provider.

Gatsby Cloud + S3

This will be faster than an AWS-only setup, but will not harness the full power of Reactive Site Generation. Right now, that’s only available in Gatsby Cloud. 

Gatsby Cloud is able to hook into the Gatsby Framework in a way that no other build solution can do. It’s because of this that our incremental builds only build what the content editor or code editor have changed. If you build in AWS, AWS has to rebuild the entire page—so it takes about 10x longer to process. 

Faster build times. Here’s a sample site that we built on both services:

On its own, Gatsby Cloud is 50x+ faster than AWS to build. But when you use Gatsby Cloud builds together with AWS S3, you get build times that are somewhere in the middle:

Comparing build times

(illustrative diagram; build times will vary depending on site)

Access to content workflows. And builds are just one piece of the puzzle. Gatsby Cloud also works directly with the CMS that you prefer to provide an out-of-the-box preview experience for content editors

The content editor workflow is incredibly important to Gatsby. We want your content edits to go live instantly with incremental builds. If built on AWS, your content editors would be waiting 10-20 minutes before seeing their changes go live—and we don’t know about you, but this can be quite confusing for their workflow.

Ultimately, we want your team to have the best experience.

We built this workaround so you can firsthand experience the power of Gatsby’s build system—and hopefully one day, enjoy the full benefits of Gatsby Cloud Builds + Hosting!

Share on TwitterShare on LinkedInShare on FacebookShare via Email

Gatsby cofounder & chief strategy officer. Programmer, analyst, writer

Follow Sam Bhagwat on Twitter

Talk to our team of Gatsby Experts to supercharge your website performance.

Contact Gatsby Now
© 2022 Gatsby, Inc.