Upgrade to Pro — share decks privately, control downloads, hide ads and more …

立ち上げ期のSaaSを支えるAWSの技術 / AWS technology supporting SaaS in its start-up phase

立ち上げ期のSaaSを支えるAWSの技術 / AWS technology supporting SaaS in its start-up phase

SaaS on AWS 2022 対面式セミナー Day 2 (10/26) 懇親会で登壇したライトニングトーク資料です。

Hironori Yokoyama

October 31, 2022
Tweet

More Decks by Hironori Yokoyama

Other Decks in Technology

Transcript

  1. 0 Copyright© System Integrator Corp. All rights reserved. System Integrator

    SaaS on AWS 2022 立ち上げ期のSaaSを支えるAWSの技術 ~新規事業SaaSを1年開発/運用した話~ 2022年10月26日 株式会社システムインテグレータ 横山弘典
  2. 1 Copyright© System Integrator Corp. All rights reserved. System Integrator

    横山 弘典 (@yokoyantech) • 株式会社システムインテグレータ • 製品企画室 • 宮崎→福岡→埼玉 • AWS歴 • 約8年 • SAP、DOP、SCS、DBS • JAWS DAYS • 2020年登壇 • 2021年登壇
  3. 2 Copyright© System Integrator Corp. All rights reserved. System Integrator

    株式会社システムインテグレータ • 埼玉県さいたま市にある会社 • 東証スタンダード • 創業28年目 • 事業内容 • 自社パッケージソフト(EC、ERPなど) • 企画、開発 • カスタマイズ • 自社WEBサービス • 開発、運営 • 技術スタック • AWS、Azure • Java、C#、Python、Rubyなど
  4. 3 Copyright© System Integrator Corp. All rights reserved. System Integrator

    ボッチ参加なので AWS仲間を作りたい!
  5. 6 Copyright© System Integrator Corp. All rights reserved. System Integrator

    IDEA GARDENとは? アイデアを創出し みんなで育てるクラウドサービス
  6. 9 Copyright© System Integrator Corp. All rights reserved. System Integrator

    Mission1 3ヶ月で動く プロトをつくる Mission2 SaaS利用状況の 見える化 Mission3 1ヶ月でイベント 登録サイトをつくる 今日お話すること
  7. 10 Copyright© System Integrator Corp. All rights reserved. System Integrator

    Mission1 3ヶ月で動く プロトをつくる Mission2 SaaS利用状況の 見える化 Mission3 1ヶ月でイベント 登録サイトをつくる 今日お話すること
  8. 12 Copyright© System Integrator Corp. All rights reserved. System Integrator

    リーダー 横山 フロントエンド 後輩A バックエンド 後輩B 3人の開発チーム
  9. 13 Copyright© System Integrator Corp. All rights reserved. System Integrator

    実装以外全部 (要件整理/クラウド) 横山 見た目 (フロントエンド) 後輩A 内部処理 (バックエンド) 後輩B 3人の開発チーム
  10. 14 Copyright© System Integrator Corp. All rights reserved. System Integrator

    限られた人数で やることはいっぱい アプリ開発 インフラ開発 各種サポート
  11. 15 Copyright© System Integrator Corp. All rights reserved. System Integrator

    プロダクト関連 ビジョン策定 横山 プロダクトの方向づけ 横山 顧客課題の発見 横山 課題の仮説検証 横山 ユーザーインタビュー 横山 ウェビナー登壇 横山 お客様サポート 横山 プロジェクト管理 ロードマップ作成 横山 プロダクトバックログ整理 横山 スプリントプランニング 横山+α インフラ AWS設計 横山 AWS実装 横山 リリース作業 横山+α 運用監視 横山+α
  12. 16 Copyright© System Integrator Corp. All rights reserved. System Integrator

    家族や子供との時間も 大切にしたい
  13. 17 Copyright© System Integrator Corp. All rights reserved. System Integrator

    精神論で頑張らない AWSで仕組みを変える
  14. 18 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudFormation ECS ECR <ミッション1> 3ヶ月で動くプロトタイプを作る
  15. 20 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudFormation ECS ECR <ミッション1> 3ヶ月で動くプロトタイプを作る
  16. 22 Copyright© System Integrator Corp. All rights reserved. System Integrator

    # 他のスタックからパラメータ参照するためにOutputsで定義する Outputs: VPC: Value: !Ref VPC Export: Name: !Sub "${ENV}-VPC" VPCCIDR: Value: !Ref VPCCIDR Export: Name: !Sub "${ENV}-VPCCIDR" PublicSubnet1a: Value: !Ref PublicSubnet1a Export: Name: !Sub "${ENV}-PublicSubnet1a" CloudFormationのパラメータ化、スタック化
  17. 23 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudFormation ECS ECR <ミッション1> 3ヶ月で動くプロトタイプを作る
  18. 25 Copyright© System Integrator Corp. All rights reserved. System Integrator

    Private subnet VPC Availability Zone a Availability Zone c Public subnet ACM Route 53 VPN gateway ALB AWS Cloud RDS(Primary) S3 Fargate / ECS Cluster Service(Frontend) Node.js Task ECR Endpoints Customer gateway VPN connection 開発チーム 当社 Internet gateway Internet Application Image Push Push PrivateLink RDS(Standby) ElastiCache Redis ElastiCache Redis(Standby) Service(Backend) Rails Task
  19. 26 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudFormation ECS ECR <ミッション1> 3ヶ月で動くプロトタイプを作る
  20. 28 Copyright© System Integrator Corp. All rights reserved. System Integrator

    on: push: branches: - develop jobs: backend-deploy: runs-on: ubuntu-latest env: 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@v1 with: 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-staging uses: aws-actions/amazon-ecr-login@v1 - name: Build and push Backend image (Staging) uses: docker/build-push-action@v3 with: push: true context: ./backend tags: ${{ steps.login-ecr-staging.outputs.registry }}/${{ env.BACKEND_IMAGE_NAME }}:${{ github.sha }} GitHub Actionsによる ECR への自動プッシュ
  21. 30 Copyright© System Integrator Corp. All rights reserved. System Integrator

    steps: # 前ページからの続き - name: Download task definition run: 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 definition id: task-def uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: dev-idea-garden-container-backend image: ${{ steps.login-ecr-staging.outputs.registry }}/${{ env.BACKEND_IMAGE_NAME }}:${{ github.sha }} - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def.outputs.task-definition }} service: dev-idea-garden-service-backend cluster: dev-idea-garden-cluster GitHub Actionsによる ECR への自動プッシュ→ECSデプロイ
  22. 31 Copyright© System Integrator Corp. All rights reserved. System Integrator

    Mission1 3ヶ月で動く プロトをつくる Mission2 SaaS利用状況の 見える化 Mission3 1ヶ月でイベント 登録サイトをつくる 今日お話すること
  23. 32 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudWatch Container Insights Amazon QuickSight AWS Chatbot <ミッション2> SaaS利用状況の見える化
  24. 33 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudWatch Container Insights Amazon QuickSight AWS Chatbot <ミッション2> SaaS利用状況の見える化
  25. 35 Copyright© System Integrator Corp. All rights reserved. System Integrator

    AWS QuickSightによる利用状況の自動集計→メール通知 スキーマでのテナント分離は分析が面倒→行でテナント分離へ
  26. 37 Copyright© System Integrator Corp. All rights reserved. System Integrator

    CloudWatch Container Insights Amazon QuickSight AWS Chatbot <ミッション2> SaaS利用状況の見える化
  27. 38 Copyright© System Integrator Corp. All rights reserved. System Integrator

    LambdaによるECSタスク自動起動/停止→Slackへ通知
  28. 39 Copyright© System Integrator Corp. All rights reserved. System Integrator

    Mission1 3ヶ月で動く プロトをつくる Mission2 SaaS利用状況の 見える化 Mission3 1ヶ月でイベント 登録サイトをつくる 今日お話すること
  29. 42 Copyright© System Integrator Corp. All rights reserved. System Integrator

    API Gateway AWS Lambda AWS Amplify <ミッション3> 1ヶ月でイベント登録サイトを作る
  30. 43 Copyright© System Integrator Corp. All rights reserved. System Integrator

    VPC Availability Zone a Availability Zone c Public subnet Private subnet ACM Route 53 VPN gateway AWS Cloud (Entry App) RDS Customer gateway VPN connection 開発チーム 当社 Internet gateway Internet ElastiCache Redis Dev Amplify/ SSR SES Email Function URLs AWS Cloud(IDEA GARDEN) Private subnet VPC RDS ユーザー情報 移行Script ユーザー情報 移行Script API Gateway
  31. 45 Copyright© System Integrator Corp. All rights reserved. System Integrator

    精神論で頑張らない AWSで仕組みを変える
  32. 46 Copyright© System Integrator Corp. All rights reserved. System Integrator

    みなさんのSaaS立ち上げを 応援しています!
  33. 47 Copyright© System Integrator Corp. All rights reserved. System Integrator

    ※本資料掲載の情報・画像など、すべてのコンテンツの無断複写・転載を禁じます。