AWS Bites Podcast

149. Headless CMS on AWS

We dive deep into Strapi, an open-source headless CMS that's changing how we approach content management and CRUD applications. In this episode, we explore how Strapi separates content from presentation, allowing marketing teams to manage content independently while developers maintain full control over the frontend experience. We discuss the powerful features that caught our attention, including the visual content type builder, dynamic zones, components, and the innovative blocks editor that stores content as JSON rather than HTML. We also cover practical aspects like local development workflows, data synchronization between environments, and deployment strategies on AWS. While we highlight some rough edges around documentation and minor bugs, we share our overall positive experience and provide insights into when Strapi might be the right choice for your next project.

AWS Bites is brought to you in association with fourTheorem. If you need a friendly partner to support you and work with you to de-risk any AWS migration or development project, check them out at fourtheorem.com.

In this episode, we mentioned the following resources:

Let's talk!

Do you agree with our opinions? Do you have interesting AWS questions you'd like us to chat about? Leave a comment on YouTube or connect with us on:

Luciano
00:00:00

It's Friday at 4.58pm. Marketing pings. Can we ship a new landing page for Monday with a hero, a gallery, and a testimonial slider? The site is hardcoded. Every change request lands on your plate. If you're lucky, there is a Figma file, but more often than not, it's a grab bag of screenshots and Word documents. So you roll up your sleeves, open your editor, and unstitch that new landing page into pure HTML. And there goes your weekend. Yes, we have done that enough times to know it's not fun, and we know you can relate. Now, what is the alternative? Maybe we can ship a WordPress site and let marketing manage everything themselves. They can pick templates, configure plugins, and publish all the content. We have also done that enough times to know how quickly hosting and securing this kind of setup becomes a nightmare. Plus, we prefer static sites over dynamic ones, so that approach rarely excites us. There has to be a better way, right? What if there were a way to keep content separate from how you fetch and render it? Marketed leaves in the CMS, shaping pages and publishing changes without tapping on your shoulder. Then you pick the tools you love, like Astro, Next.js, SvelteKit, or even a custom Lambda power backend, and you render everything exactly the way your design system expects. You can also choose how update flows. For instance, you can run a dynamic backend that always pulls the later content at request time, or you can keep the website totally static and wired up using something like a web book. When marketing eats publish, that triggers a CI build. Everything is rebuilt and published almost on the fly. On one of our recent projects, we did exactly that, using a tool called Strapi, which is an open source headless CMS written in Node.js. And today, we'll cover what Strapi is, what works for us, things like components, dynamic tone, the blocks editor. We also discuss the rough edges with how to run it well on AWS, and also some tips and tricks that we learned to have some kind of local workflow, and then publish the content remotely when needed. We will also mention Strapi Cloud, but full disclaimer, this episode is not sponsored by Strapi, so this is just our own unfiltered opinion. My name is Luciano, and I'm here with Eoin for another episode of AWS Bites. This episode is brought to you by fourTheorem. We'll mention a little bit more about fourTheorem on the end, so stay tuned. Okay, I admit I overdramatized the intro. I hope you enjoyed it. That's probably just one of the many many use cases that something like Strapi can help you with. So, Eoin, what do you think are other very relevant use cases for this kind of product, and what is the landscape right now?

Eoin
00:02:48

I think I'd put it in the general space of building CRUD applications, and if you're in the software game for a few years, you might find yourself building applications that do CRUD against the database, and a lot of the time you feel like every application you build, you're building some sort of a CMS with some extra features, and you don't often foresee that you need the complexity of a CMS or the flexibility of a CMS, but there's always this trade-off between, you know, can I use something general purpose, or do I really need to build something that's really fine-tuned to our needs, but that we have to spend a lot of time building and maintaining? So, whether you're in, you know, a SaaS company building a SaaS application, which always needs plenty of CRUD, you know, you've got relational model or some sort of NoSQL storage, an API in front of it, and a front-end in front of that, but equally, it could be like a line of business application in an enterprise when, you know, you've got some business user who needs to be able to enter data, retrieve data, and update data from a web app, mobile app, whatever it is. It's a good idea, I think, every so often to look at what's out there that maybe could save you tons and tons of work and stop you from having to reinvent that wheel yet again. And there's a lot of providers in the space with a lot of different trade-offs. So, there's Contentful, which has been around for a good amount of time. I remember using it like seven or eight years ago, I think. Storyblock is another one. Sanity CMS is one called HighGraph, which used to be called Graph CMS, I believe. And we see a lot of these come and go. Byline CMS is another one. Now, that's fully open source, but very new. So, it's very much work in progress. And then there's the one that we'll get to talk about a little bit more today, which is Strapi. Luciano, do you want to give us the 10,000-foot overview of what Strapi is?

00:12:01

And how do I render all the different types? So there might be a lot of work involved in just rendering a basic piece of text. So thankfully, Strapi offers some built-in renderers. For instance, if you use React, there is one called blocks React Renderer, we'll have the link in the show notes, which gives you effectively a component that knows how to render the abstract syntax tree with very clear defaults, and allows you also to override some of these defaults. For example, if you want to customize the image block, then you can say, okay, I'm going to provide my own image component. And only when in the abstract syntax tree, there is an image that is going to be rendered, then your component is going to be injected, and you have full control on how to render images. You don't need to specify all the other blocks kind if you are okay with the defaults at that point. So this is pretty cool, because it kind of does all the heavy lifting for you. And it gives you a very easy interface in case you want to customize something. So yeah, that's an experience that I think is really enjoyable, because it unlocks another level of customization. And you can even end up creating your own custom components, which is something that I also enjoyed. So this is outside the block renderer. So you can imagine the block renderer as a field in your data model, where you can say, every time I need rich content, I'm just going to put it in a field, maybe you call that, I don't know, content, or blog body, or whatever that is.

Help us to make this transcription better! If you find an error, please submit a PR with your corrections.