Infrastructure from Code is a radically different approach that makes building scalable apps in the cloud ridiculously easy! The three core tenets of IfC are:
Cloud is the new computer, and just like C and C++ did for machine code, developers need a more productive way to write native cloud applications.
Developers should not need to write both application logic and control plane specific instructions (IaC). Infrastructure should be self-provisioning.
Applications should be portable across technologies and providers by using the best cloud has to offer, not the lowest common denominator.
IfC lets developers leverage their existing programming skills, allowing them to focus on writing business logic instead of learning and configuring constantly evolving cloud services. IfC provides a translation layer that automatically enables cloud best practices while making developers hyperproductive.
For example, the following sample IfC implementation...
import { api, data, events } from '@some-ifc-sdk'api.post("/users", async (req, res) => {
const { email, name } = req.body;
const newUser = await data.set(`user:${email}`, { email, name });
res.send({ user: newUser });
});
data.on("created:user:*", ({ item }) => {
console.log("New user created!");
events.publish("user.created", { after: "1 day" } item)
});
events.on("user.created", (event) => {
console.log('user.created event received!');
// Send a follow up email, call an API, etc.
})
...when deployed to AWS, would automatically provision and configure the following resources...
...including mapping IAM permissions between services.
“
Programming languages and cloud infrastructure will converge in a single paradigm: where all resources required will be automatically provisioned, and optimized by the environment that runs it.
~ Shawn "swyx" Wang
There is a lot more to Infrastructure from Code and the capabilities it enables. A number of platforms like Ampt, Encore, Shuttle, Modal, Nitric, Klotho, and more are already offering some variation of IfC.
Stay tuned as we'll be adding more information to this site as the ecosystem continues to evolve.
Additional Reading
- The Current State of Infrastructure From Code by Allen Helton
- The Self Provisioning Runtime by Shawn "swyx" Wang
- Infrastructure-from-Code vs Infrastructure-as-Code by Paul Swail
- The future of cloud development by Jeremy Daly
- ▶️ AWS re:Invent 2022 - Unleash developer productivity with infrastructure from code (COM301) by Jeremy Daly
- What Does The Future Hold For Serverless? by Allen Helton
- Overcoming Infrastructure as Code obstacles: It's time for Infrastructure from Code by Asher Sterkin