Cloud Native 12 min read

Why OAM Makes Serverless on AWS ECS a One‑Click Deployment

This article explains how the Open Application Model (OAM) abstracts away infrastructure details, enabling developers to define applications with concise YAML files and deploy them to AWS Fargate via the Amazon ECS for OAM project using just a few simple commands.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Why OAM Makes Serverless on AWS ECS a One‑Click Deployment

Serverless background

Serverless was first mentioned in a 2012 article, but the paradigm became practical with AWS Lambda in 2014. Lambda introduced automatic scaling to zero and pay‑as‑you‑go billing, allowing developers to run code without managing servers. In 2017 AWS launched Fargate, extending the serverless model to container workloads, a model later adopted by Google Cloud Run and other platforms.

Open Application Model (OAM)

OAM is a vendor‑neutral specification co‑created by Alibaba Cloud and Microsoft and maintained by the cloud‑native community. It defines an application‑centric, declarative abstraction layer that separates developer‑focused component definitions from operator‑focused operational traits.

Example component definition (developer side):

apiVersion: core.oam.dev/v1alpha2
kind: Component
metadata:
  name: web-server
spec:
  workload:
    apiVersion: core.oam.dev/v1alpha2
    kind: Server
    spec:
      containers:
        - name: frontend
          image: frontend:latest

Example application configuration (operator side) that adds a HorizontalPodAutoscaler trait:

apiVersion: core.oam.dev/v1alpha2
kind: ApplicationConfiguration
metadata:
  name: helloworld
spec:
  components:
    - name: frontend
      traits:
        - trait:
            apiVersion: autoscaling.k8s.io/v2beta2
            kind: HorizontalPodAutoscaler
            metadata:
              name: scale-hello
            spec:
              minReplicas: 1
              maxReplicas: 10

When OAM is processed by an OAM plugin, the minimal fields are expanded into full Kubernetes Deployment and HPA objects.

AWS ECS for Open Application Model

In March 2020 the AWS ECS team released the open‑source project Amazon ECS for Open Application Model (GitHub repository: https://github.com/awslabs/amazon-ecs-for-open-application-model). The project implements OAM on top of the serverless container runtime Fargate, enabling deployment of OAM‑described applications with a single CLI.

Preparation steps

Configure AWS credentials locally with aws configure.

Build the project to obtain the oam-ecs executable.

Run oam-ecs env to let AWS create a VPC and the required public/private subnets.

After these steps, a single command can deploy a complete application with an HPA to Fargate:

oam-ecs app deploy -f helloworld-app.yaml

Deploying a multi‑component application

The official examples consist of two component files ( server-component.yaml, worker-component.yaml) and an application configuration file ( example-app.yaml) that adds a manual‑scaler trait.

apiVersion: core.oam.dev/v1alpha1
kind: ApplicationConfiguration
metadata:
  name: example-app
spec:
  components:
    - componentName: worker-v1
      instanceName: example-worker
      traits:
        - name: manual-scaler
          properties:
            replicaCount: 2
    - componentName: server-v1
      instanceName: example-server
      parameterValues:
        - name: WorldValue
          value: Everyone

Deployment is a one‑liner:

oam-ecs app deploy \
  -f examples/example-app.yaml \
  -f examples/worker-component.yaml \
  -f examples/server-component.yaml

After the command finishes, oam-ecs app show displays the public DNS name, allowing direct browser access.

Why OAM + Serverless matters

Without OAM, achieving the same deployment via the AWS console requires navigating multiple service pages or writing extensive CloudFormation templates. OAM reduces the workflow to a few declarative YAML files and a single CLI command, dramatically lowering operational complexity.

The model has been adopted by Alibaba Cloud’s EDAS service and the CNCF Crossplane project, and its extensibility allows it to describe not only containers but also functions, VMs, WebAssembly, and other workloads across different serverless platforms.

Project repository: https://github.com/awslabs/amazon-ecs-for-open-application-model OAM specification: https://github.com/oam-dev/spec Crossplane (OAM adopter): https://github.com/crossplane/crossplane
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeServerlessKubernetesYAMLOAMAWS ECSFargate
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.