---
title: 2024年度COINSAC入試_資料2
tags:  #ac入試 #aws  
author: [Ryo Sato](https://www.docswell.com/user/mizuame)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/VJN8M32878.jpg?width=480
description: 筑波大学情報学群情報科学類の2024年度AC入試の1次審査に出した資料です。 内容が変なのはそれはそう。
published: November 19, 24
canonical: https://www.docswell.com/s/mizuame/57RJ3D-COINS24AC-02
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/VJN8M32878.jpg)

Alice_Maker の
インフラストラクチャー


# Page. 2

![Page Image](https://bcdn.docswell.com/page/YE9KN91XE3.jpg)

以下の4つのAPI Gatewayを使用しています
・make-token-API
→playfabからのtoken生成用エンドポイント
Amazon API Gateway
・py-callGPT-API
→openAI GPTシリーズを呼ぶエンドポイント
・py-callSTT-API
→openAI Whisperを呼ぶエンドポイント
・py-stt-API
→rinna株式会社のkomeotionを呼ぶエンドポイント
1/8


# Page. 3

![Page Image](https://bcdn.docswell.com/page/GE8RK949JD.jpg)

API gateway側での検証について。通常gateway→lambda関数の順で呼び出されま
すが、必要なヘッダーが無いとlambdaの起動自体が無駄です。よってgatewayで
ヘッダーの検証を行います。以下はヘッダーが無い場合のレスポンスです。
Amazon API Gateway
{ &quot;message&quot;: &quot;Missing required request parameters: [One-Time-Token,
Model-Name, User-Id]&quot;}
2/8


# Page. 4

![Page Image](https://bcdn.docswell.com/page/LELKZW6MJR.jpg)

DyanamoDBはミリ秒単位で書き込みが可能なNoSQL型のDBの為採用しました。
パーティーションキー(primary key)がtoken、ソートキーがuseridとなっています。
Amazon DynamoDB
3/8


# Page. 5

![Page Image](https://bcdn.docswell.com/page/4JM2V956JW.jpg)

AWS Lambda
実行時にサーバーを起動させ、関数の処理が終わ
ると終了するサービス。サーバーレスなアプリを
作ることができる。複数の言語が使えるがメ
ジャーなPython 3.1を選択。
注意
ソースコード作成にあたり、Github copilot、
ChatGPT、Stack Overflow、Qiita、Zennを使用、
参考にしています。ご注意ください。
4/8


# Page. 6

![Page Image](https://bcdn.docswell.com/page/PJRM2G3NE9.jpg)

AWS Lambda
5/8


# Page. 7

![Page Image](https://bcdn.docswell.com/page/PEXVDX487X.jpg)

AWS Lambda
6/8


# Page. 8

![Page Image](https://bcdn.docswell.com/page/3EKQXWZLED.jpg)

Maketoken 関数
Azure PlayFab
公式より引用
PlayFab は、マネージド ゲーム サービス、リアルタイム分析、
および LiveOps を備えたライブ ゲーム向けの完全なバックエン
ド プラットフォームです。 これらの機能は、コストを削減しな
がら収益を上げ、プレイヤーのエンゲージメントを高めるのに
役立ちます。
Cloudscriptにはjavascriptを使用
注意
ソースコード作成にあたり、Github copilot、ChatGPT、Stack
Overflow、Qiita、Zenn、PlayFab Communityを使用、参考に
しています。ご注意ください。
7/8


# Page. 9

![Page Image](https://bcdn.docswell.com/page/L73P51D6E5.jpg)

8/8


