iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🍟

Deploying an Express API with AWS App Runner

に公開

What is AWS App Runner?

AWS App Runner is a new service from AWS that was just recently announced on May 19, 2021.
https://aws.amazon.com/jp/blogs/news/introducing-aws-app-runner/

It is said to be "the simplest way to build and run containerized web applications on AWS."

Trying it out right away

Preparing the app to deploy

For now, any app would do, so I prepared a simple API that says HelloWorld using Node.js + TypeScript + Express and placed it on GitHub.
https://github.com/k-ibaraki/sample-app-runner

Creating an App Runner service from the console

  • Click "Create an App Runner service" from this link:
    https://ap-northeast-1.console.aws.amazon.com/apprunner/home?region=ap-northeast-1#/welcome

  • For the source, you can choose between "Container registry" and "Source code repository."
    Since I'm using GitHub this time, I'll select "Source code repository."

  • A Connector is required for integration with GitHub, so set that up.

  • It seems to support Node.js 12 and Python 3.
    I'll select Node.js this time.

  • Set the build command, start command, and port.
    While it can be configured via a yaml file, I'll set it in the console this time.

  • After that, just leave everything at the default settings and create the service!!

  • The deployment was completed after waiting for just under 10 minutes.

  • Connecting to the URL confirmed that it was running successfully.

Impressions

  • It is truly easy to publish web apps and APIs. I could use it without reading any documentation at all. This is amazing.
  • I haven't tested it yet, but it apparently supports auto-scaling. Great.
  • Even though it's containers, you can deploy without writing anything container-like, so even people without container knowledge can use it with peace of mind.
  • Since it can deploy automatically from GitHub, it's easy because there's no need to build your own CD pipeline.
  • It feels like the backend version of Amplify's frontend features.
    • Will Amplify for the frontend and App Runner for the backend become the mainstream from now on?
    • On the other hand, I'm curious about how to differentiate it from Amplify's API features.
      As I wrote in a previous article, Amplify also supports containers.
      https://zenn.dev/ibaraki/articles/0d3db66e08c5f9
  • While it's easy to publish, I'm curious about how much customization is possible for fine-tuning.
    • (Since I haven't read the documentation, I don't know what's possible)

I'll read the documentation after this and play around a bit more to see what else I can do.

Discussion