Architect 6.0: Ruby, Python, CDNs, and CloudFormation

Ryan Block’s avatar

by Ryan Block
@ryan
on

Architect Logo

Since 2017, Architect has been the premiere foundation-backed open source serverless framework, with a clear focus on being the simplest, fastest way to build a modern web app.

The space has evolved rapidly, and we’re incredibly excited to announce Architect 6 (Ogopogo): a ground-up rewrite with first-class Ruby & Python support, that combines the speed and simplicity of which Architect users are accustomed, with the determinism of AWS’s infrastructure-as-code standard, CloudFormation.

Create your first serverless app in < 60 seconds!

Want to give it a go? Here’s the super quickstart, no AWS credentials required.

npm i -g @architect/architect

Run Architect Sandbox

Learn more about building with Architect’s various serverless app primitives, such as HTTP functions, WebSockets, events, and more.

To provision and ship to AWS, just add your credentials to your Architect app’s default config (the .arc file, unless you prefer JSON or YAML). Your first CloudFormation based deploy will (generally) take two minutes or less, with subsequent deploys completing within seconds.

There’s a lot of exciting changes enabled by the move to CloudFormation which we’ll review further below.

Ruby & Python

Ruby & Python logos

Architect now includes first-class Ruby and Python support, in addition to Node.js. You can go all-in with a single runtime for all cloud functions in your project, or you can leverage the strengths of each by mixing and matching runtimes on a per-cloud-function basis.

Ruby and Python are super fast on AWS Lambda and have many excellent ecosystem libraries which you can start leveraging immediately: full Ruby and Python support also includes the automatic hydration of requirements.txt and Gemfile, and local dev server support with Architect’s sandbox.

Also worth noting: all function code generated by Architect is dependency-free by default, with vanilla AWS Lambda payload signatures. However, to make AWS a bit easier to work with, Architect also supports runtime helper libraries to make common tasks easier:

Front-end: CDN support and enhanced support for SPAs

Front-end developers are very big drivers of the serverless movement and this release reflects our ongoing commitment to the community. Architect adds @cdn, which automatically generates an ultra-fast CloudFront CDN distribution for your application.

Architect has always had first-class static asset support, and in 6.x we’re further augmenting this capability by enabling Architect users to mount their public/ folder’s static assets at the app root. This means you can write a zero-config Gatsby app, or index.html file (or anything in between), and augment it with as many dynamic runtime-powered routes as you need.

This popular architectural pattern is captured beautifully by the app.arc file format:

@app
myjamstack

@cdn     # Provisions your very own CDN
@static  # Delivers your static assets from your pubic/ folder
@http    # Create your API's routes
post /graphql
  • app.arc for a single page app
  • @app myjamstack
  • @cdn
  • @static # Delivers static assets from your public/ folder
  • @http # Create your API’s routes below
  • post /graphql

Extensibility with @macros

Under the hood, the above app.arc file generates ~460 lines of CloudFormation infrastructure-as-code configuration — that means your author-time obligation and bug surface are reduced by 65x. But just as importantly: none of that IaC configuration is hidden behind a leaky abstraction: you can inspect, read, learn, modify and improve the generated code.

In this vein, Architect 6.x adds an extremely powerful new primitive to building apps: @macros.

Macros allow you modify the generated CloudFormation templates prior to deployment. This means you can deterministically change any aspect of Architect’s built-ins, or augment your project with any CloudFormation supported AWS service or system you choose, all managed from within your app’s app.arc file.

Head here to learn more about extending your Architect app with @macros — we can’t wait to see what you cook up!

Upgrading from Architect 5.x

Where possible, we’ve taken every possible measure to ensure a seamless upgrade to Architect 6.x (Ogopogo) from 5.x (Catalope) and 4.x (Yeti). However, because of the nature of the changes involved in building Architect apps on CloudFormation, it is possible some apps may experience breaking changes. To learn more about this, please check out our extensive Architect upgrade guide.

Thank you

We couldn’t do this work without the support and feedback of the Architect community, and of the folks at AWS working hard to make the future a little more serverless.

More specifically, we’d like to give a shout out to: Ajay Nair, Alex Dilley, Amber Costley, Ben Kehoe, @boldenburg, Carter Rabasa, Chris Munns, Dhruv Sood, Emanuel Kluge, Fil Maj, Giuseppe Piccinni, Gregor Martynus, Jesse Hattabaugh, Jory Burson, Kevin Stewart, Kris Borchers, Matt Weagle, Michael Hart, Mike MacCana, Mikeal Rogers, Salman Paracha, Sanath Ramesh, and Trishika Pattabiraman

Technology is not a zero sum game, and we’d also like to acknowledge and thank the entire serverless community at large for inspiring many of the changes and enhancements that came to define Architect 6.x.

Since open sourcing Architect with the OpenJS Foundation, there have been over 280 releases — with more to come based on your feedback and contributions!

Ogopogo

The mighty Ogopogo!