SaaS on AWS 2022 対面式セミナー Day 2 (10/26) 懇親会で登壇したライトニングトーク資料です。
0Copyright© System Integrator Corp. All rights reserved.System IntegratorSaaS on AWS 2022立ち上げ期のSaaSを支えるAWSの技術~新規事業SaaSを1年開発/運用した話~2022年10月26日株式会社システムインテグレータ横山弘典
View Slide
1Copyright© System Integrator Corp. All rights reserved.System Integrator横山 弘典(@yokoyantech)• 株式会社システムインテグレータ• 製品企画室• 宮崎→福岡→埼玉• AWS歴• 約8年• SAP、DOP、SCS、DBS• JAWS DAYS• 2020年登壇• 2021年登壇
2Copyright© System Integrator Corp. All rights reserved.System Integrator株式会社システムインテグレータ• 埼玉県さいたま市にある会社• 東証スタンダード• 創業28年目• 事業内容• 自社パッケージソフト(EC、ERPなど)• 企画、開発• カスタマイズ• 自社WEBサービス• 開発、運営• 技術スタック• AWS、Azure• Java、C#、Python、Rubyなど
3Copyright© System Integrator Corp. All rights reserved.System Integratorボッチ参加なのでAWS仲間を作りたい!
4Copyright© System Integrator Corp. All rights reserved.System Integrator体験談 共感 実践今日の目的
5Copyright© System Integrator Corp. All rights reserved.System Integrator
6Copyright© System Integrator Corp. All rights reserved.System IntegratorIDEA GARDENとは?アイデアを創出しみんなで育てるクラウドサービス
7Copyright© System Integrator Corp. All rights reserved.System Integrator
8Copyright© System Integrator Corp. All rights reserved.System Integrator2週間で400アイデア
9Copyright© System Integrator Corp. All rights reserved.System IntegratorMission13ヶ月で動くプロトをつくるMission2SaaS利用状況の見える化Mission31ヶ月でイベント登録サイトをつくる今日お話すること
10Copyright© System Integrator Corp. All rights reserved.System IntegratorMission13ヶ月で動くプロトをつくるMission2SaaS利用状況の見える化Mission31ヶ月でイベント登録サイトをつくる今日お話すること
11Copyright© System Integrator Corp. All rights reserved.System Integrator社員発の企画が実現
12Copyright© System Integrator Corp. All rights reserved.System Integratorリーダー横山フロントエンド後輩Aバックエンド後輩B3人の開発チーム
13Copyright© System Integrator Corp. All rights reserved.System Integrator実装以外全部(要件整理/クラウド)横山見た目(フロントエンド)後輩A内部処理(バックエンド)後輩B3人の開発チーム
14Copyright© System Integrator Corp. All rights reserved.System Integrator限られた人数でやることはいっぱいアプリ開発 インフラ開発 各種サポート
15Copyright© System Integrator Corp. All rights reserved.System Integratorプロダクト関連 ビジョン策定 横山プロダクトの方向づけ 横山顧客課題の発見 横山課題の仮説検証 横山ユーザーインタビュー 横山ウェビナー登壇 横山お客様サポート 横山プロジェクト管理 ロードマップ作成 横山プロダクトバックログ整理 横山スプリントプランニング 横山+αインフラ AWS設計 横山AWS実装 横山リリース作業 横山+α運用監視 横山+α
16Copyright© System Integrator Corp. All rights reserved.System Integrator家族や子供との時間も大切にしたい
17Copyright© System Integrator Corp. All rights reserved.System Integrator精神論で頑張らないAWSで仕組みを変える
18Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudFormation ECS ECR<ミッション1>3ヶ月で動くプロトタイプを作る
19Copyright© System Integrator Corp. All rights reserved.System Integrator
20Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudFormation ECS ECR<ミッション1>3ヶ月で動くプロトタイプを作る
21Copyright© System Integrator Corp. All rights reserved.System Integrator手動のAWS構築は手間
22Copyright© System Integrator Corp. All rights reserved.System Integrator# 他のスタックからパラメータ参照するためにOutputsで定義するOutputs:VPC:Value: !Ref VPCExport:Name: !Sub "${ENV}-VPC"VPCCIDR:Value: !Ref VPCCIDRExport:Name: !Sub "${ENV}-VPCCIDR"PublicSubnet1a:Value: !Ref PublicSubnet1aExport:Name: !Sub "${ENV}-PublicSubnet1a"CloudFormationのパラメータ化、スタック化
23Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudFormation ECS ECR<ミッション1>3ヶ月で動くプロトタイプを作る
24Copyright© System Integrator Corp. All rights reserved.System IntegratorEC2管理は手間
25Copyright© System Integrator Corp. All rights reserved.System IntegratorPrivate subnetVPCAvailability Zone a Availability Zone cPublic subnetACMRoute 53VPN gatewayALBAWS CloudRDS(Primary)S3Fargate / ECS ClusterService(Frontend)Node.jsTaskECREndpointsCustomergatewayVPN connection開発チーム当社InternetgatewayInternetApplicationImagePushPushPrivateLinkRDS(Standby)ElastiCacheRedisElastiCacheRedis(Standby)Service(Backend)RailsTask
26Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudFormation ECS ECR<ミッション1>3ヶ月で動くプロトタイプを作る
27Copyright© System Integrator Corp. All rights reserved.System Integrator継続的に自動デプロイしたい
28Copyright© System Integrator Corp. All rights reserved.System Integratoron:push:branches:- developjobs:backend-deploy:runs-on: ubuntu-latestenv:BACKEND_IMAGE_NAME: ${{ secrets.STAGING_BACKEND_ECR_REPOSITORY }}steps:- name: Checkout- name: Set up Docker Buildx- name: Configure AWS credentials (Staging)uses: aws-actions/configure-aws-credentials@v1with:aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}aws-region: ${{ secrets.STAGING_AWS_REGION }}- name: Login to Amazon ECR (Staging)id: login-ecr-staginguses: aws-actions/amazon-ecr-login@v1- name: Build and push Backend image (Staging)uses: docker/build-push-action@v3with:push: truecontext: ./backendtags: ${{ steps.login-ecr-staging.outputs.registry }}/${{ env.BACKEND_IMAGE_NAME }}:${{ github.sha }}GitHub Actionsによる ECR への自動プッシュ
29Copyright© System Integrator Corp. All rights reserved.System IntegratorAWS公式GitHub Actions(便利!)
30Copyright© System Integrator Corp. All rights reserved.System Integratorsteps:# 前ページからの続き- name: Download task definitionrun: aws ecs describe-task-definition --task-definition dev-idea-garden-backend --query taskDefinition > task-definition.json- name: Fill in the new image ID in the Amazon ECS task definitionid: task-defuses: aws-actions/amazon-ecs-render-task-definition@v1with:task-definition: task-definition.jsoncontainer-name: dev-idea-garden-container-backendimage: ${{ steps.login-ecr-staging.outputs.registry }}/${{ env.BACKEND_IMAGE_NAME }}:${{ github.sha }}- name: Deploy Amazon ECS task definitionuses: aws-actions/amazon-ecs-deploy-task-definition@v1with:task-definition: ${{ steps.task-def.outputs.task-definition }}service: dev-idea-garden-service-backendcluster: dev-idea-garden-clusterGitHub Actionsによる ECR への自動プッシュ→ECSデプロイ
31Copyright© System Integrator Corp. All rights reserved.System IntegratorMission13ヶ月で動くプロトをつくるMission2SaaS利用状況の見える化Mission31ヶ月でイベント登録サイトをつくる今日お話すること
32Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudWatchContainer InsightsAmazonQuickSightAWSChatbot<ミッション2>SaaS利用状況の見える化
33Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudWatchContainer InsightsAmazonQuickSightAWSChatbot<ミッション2>SaaS利用状況の見える化
34Copyright© System Integrator Corp. All rights reserved.System Integrator手動で毎回集計するのは手間
35Copyright© System Integrator Corp. All rights reserved.System IntegratorAWS QuickSightによる利用状況の自動集計→メール通知スキーマでのテナント分離は分析が面倒→行でテナント分離へ
36Copyright© System Integrator Corp. All rights reserved.System Integrator手動で毎回 ECS を起動するのは手間
37Copyright© System Integrator Corp. All rights reserved.System IntegratorCloudWatchContainer InsightsAmazonQuickSightAWSChatbot<ミッション2>SaaS利用状況の見える化
38Copyright© System Integrator Corp. All rights reserved.System IntegratorLambdaによるECSタスク自動起動/停止→Slackへ通知
39Copyright© System Integrator Corp. All rights reserved.System IntegratorMission13ヶ月で動くプロトをつくるMission2SaaS利用状況の見える化Mission31ヶ月でイベント登録サイトをつくる今日お話すること
40Copyright© System Integrator Corp. All rights reserved.System Integrator
41Copyright© System Integrator Corp. All rights reserved.System Integrator簡単に別アプリを作りたい
42Copyright© System Integrator Corp. All rights reserved.System IntegratorAPI Gateway AWS Lambda AWS Amplify<ミッション3>1ヶ月でイベント登録サイトを作る
43Copyright© System Integrator Corp. All rights reserved.System IntegratorVPCAvailability Zone a Availability Zone cPublic subnetPrivate subnetACMRoute 53VPN gatewayAWS Cloud(Entry App)RDSCustomergatewayVPN connection開発チーム当社InternetgatewayInternetElastiCacheRedisDevAmplify/SSRSESEmailFunction URLsAWS Cloud(IDEA GARDEN)Private subnetVPCRDSユーザー情報移行Scriptユーザー情報移行ScriptAPI Gateway
44Copyright© System Integrator Corp. All rights reserved.System Integrator体験談 共感 実践今日の目的
45Copyright© System Integrator Corp. All rights reserved.System Integrator精神論で頑張らないAWSで仕組みを変える
46Copyright© System Integrator Corp. All rights reserved.System IntegratorみなさんのSaaS立ち上げを応援しています!
47Copyright© System Integrator Corp. All rights reserved.System Integrator※本資料掲載の情報・画像など、すべてのコンテンツの無断複写・転載を禁じます。