Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS App Runnerがそろそろ本番環境でも使い物になりそう
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
n1215
December 20, 2022
Programming
15k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS App Runnerがそろそろ本番環境でも使い物になりそう
LTで使ったAWS App Runnerのスライドです
n1215
December 20, 2022
Transcript
17 slides
AWS App Runnerがそろそろ本番環境でも使い物 になりそう 2022年12月20日 (火) 株式会社Nextat 中榮健二 1
1. AWS App Runner 概要 2
AWS App Runner概要 https://aws.amazon.com/jp/apprunner/ 2021年5月にリリース コンテナ化されたウェブアプリケーションのフルマネージドサービス GitHubのリポジトリからのソースコードベースのデプロイとECRからのコンテナ ベースのデプロイに対応 バックエンドはFargate(Firecracker VM)
3
構成 参考:https://dev.classmethod.jp/articles/report-con406-reinvent2022/ 4
ECSとの違い デプロイパイプラインを自前で用意する必要がない ロードバランサーも組込みなのでALBなどを別途使う必要がない 1つのサービスに対し複数のコンテナを組み合わせられない オートスケールの設定項目 最小/最大インスタンス数、1コンテナあたりの同時リクエスト数の3項目 その他設定項目もECSと比べると細やかさはないがかなり楽 ECSタスクに相当するジョブの機能はない ECS Execに相当する機能はない
Arm(Graviton)、Windowsコンテナ未対応 5
2. 今年の注目のアップデート3つ 6
2022/02/08 カスタマーVPCへの接続が可能に https://docs.aws.amazon.com/apprunner/latest/relnotes/release-2022- 02-08-vpc.html VPCコネクタ対応 DynamoDBなどグローバルなリソースだけでなく、RDSなどVPC内のリソースが 使えるようになった 7
8
2022/10/28 マネージドランタイムの言語対応追加 https://aws.amazon.com/jp/about-aws/whats-new/2022/10/aws-app- runner-support-php-go-dot-net-ruby-managed-runtimes/ GitHubからの自動デプロイで利用される JavaとNode.jsのみだったところにPHP、Go、.NET、Rubyが追加 9
2022/10/31 プライベートアクセスが可能に https://aws.amazon.com/jp/about-aws/whats-new/2022/11/aws-app- runner-supports-privately-accessible-services-amazon-vpc/ インターネット経由の公開アクセスに限定されていたが、プライベートサービスを 選択するとVPC内からのアクセスに限定できるようになった VPCエンドポイント経由のアクセス CloudFront + WAFによる防御時の迂回路がなくなった
VPC内からアクセスするマイクロサービスをApp Runnerで作成することも可能 になった 10
Before 11
After 12
3. 料金など 13
料金について CloudFront + WAF + VPCエンドポイント(2AZ) + App Runner vCPU
1、メモリ2GB ずっと待機状態とすると5500円くらい(リクエスト時間に応じて料金増) CloudFront + WAF + ALB + ECS/Fargate vCPU0.5、メモリ1GB 6,500円くらい DBは未考慮、デプロイ・ビルドの料金(誤差)は別 プライベート構成にするとENIが高い(AZを減らせばもうちょい減る)がALBと トントンくらいか アクセス数の少ない社内アプリくらいであればECSより安そうな感じ 趣味で使うには高いか 14
改善されてほしい点 ゼロスケール https://github.com/aws/apprunner-roadmap/issues/9 ENIからFargateにアクセスする構成だとECS on Fargateと大差ない コールドスタート30秒くらいになりそうなのでしばらく無理そう Secrets Managerからの環境変数の読込 https://github.com/aws/apprunner-
roadmap/issues/6 最低スペック変更 https://github.com/aws/apprunner-roadmap/issues/25 vCPU 1 + メモリ2GBが最低スペックなので Arm対応 https://github.com/aws/apprunner-roadmap/issues/98 サイドカー対応(無理そう) https://github.com/aws/apprunner- roadmap/issues/71 PHPのマネージドランタイムでビルトインウェブサーバーを使わせるのをやめろ https://github.com/aws/apprunner-roadmap/issues/157 15
まとめ VPCコネクタによりRDSなどVPC内リソースへの接続に対応 プライベートエンドポイントによりWAFでの完全防御やマイクロサービスに対応 マネージドランタイムがGoなどにも対応 ECS/Fargateの代替として十分アリ AWS縛りがなければ Fly.io、Render、RailwayのようなPaaSかGCPの Cloud Runのほうが良さそう スケーリングや料金面はまだまだAWS
Lambdaが強い エンドポイントの多いHTTP APIを全部Lambdaにする構成は正直アンチパタ ーンだと思うのでコンテナ系のサービスには頑張ってほしい 16
ご清聴ありがとうございました 17
More Decks by n1215
See All by n1215
面倒なのは嫌なのでコンテナのマネージドサービスの極振りしたいと思います。
n1215
8
3.7k
テスト環境のインフラ・運用コストを下げたい話〜全部入りEC2を超えていけ
n1215
4
2.3k
RoadRunnerの世界 〜 Yet Another Alt PHP-FPM
n1215
2
6.2k
ブラウザから始めるgRPC 〜 gRPC-WebにPHPを添えて
n1215
1
6.8k
PHP8時代のWebアプリケーションフレームワークの話をしよう
n1215
7
7.7k
PHPとEventSauceで始めるイベントソーシングアプリケーション
n1215
9
4.7k
形から入ったドメイン駆動設計によるゲーム開発の光と闇
n1215
13
8.4k
PHPでもgRPCサーバを立てたいだけの人生だった
n1215
7
10k
PSR-15 Request Handlerから理解するMiddlewareの仕組み
n1215
3
2.8k
Other Decks in Programming
See All in Programming
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
440
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
220
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
190
Spec-driven Development with AI
simas
PRO
0
2.3k
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.1k
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.2k
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Crash Auto Pipelines
veronikapj
1
440
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
Distance field of Julia set
kinakomoti321
0
330
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Typedesign – Prime Four
hannesfritz
42
3.2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Agile that works and the tools we love
rasmusluckow
331
22k
The SEO Collaboration Effect
kristinabergwall1
1
620
The agentic SEO stack - context over prompts
schlessera
0
1k
30 Presentation Tips
portentint
PRO
1
470
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k