Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Amplify FW で爆速フロント開発
Search
yKicchan
June 23, 2020
Programming
0
120
Amplify FW で爆速フロント開発
LT資料
yKicchan
June 23, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
200
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
130
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
150
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
390
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
620
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
390
認証・認可の基本を学ぼう前編
kouyuume
0
260
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
120
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
520
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
180
Vibe codingでおすすめの言語と開発手法
uyuki234
0
100
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.9k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
68
Exploring anti-patterns in Rails
aemeredith
2
200
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
190
Technical Leadership for Architectural Decision Making
baasie
0
180
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
370
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Transcript
Amplify FW で爆速フロント開発 yKicchan 1 1
Who am I interface Me extends Person { name: "Yukiya
Murata"; twitter: "@yKicchan"; company: "Fenrir Inc."; job: "Web engineer"; favorite: " 花澤⾹菜" | "P5R" | " ピカチュウ"; skills: "React" | "Vue.js" | "Angular" | "PHP" | "Go"; } 2 2
Amplify ってなんぞ コマンド叩くだけで AWS の各種サービス作成をやってくれ る ライブラリ⼊れるだけで簡単に各種 AWS とフロントを接続 AWS
あんま触れないけどフロントは分かるって⼈は使える 逆にネイティヴや Web わからんけど AWS 分かる⼈は微妙 3 3
Amplify でできること⼀例 Cognito を利⽤した認証システム // ← 今⽇はこれする S3 + CloudFront
を利⽤した静的サイトホスティング API Gateway + Lambda で API 作成 REST, GraphQL 両対応 GitHub や CodeCommit と連携し CI/CD 4 4
とりあえず作ってみる 5 5
Required AWS Account Node.js v10.x or later npm v5.x or
later git v2.14.1 or later 6 6
Getting started $ npm install -g @aws-amplify/cli $ amplify configure
region と username 聞かれるので⼊⼒ ブラウザで IAM ユーザーの作成が求められるので作る 7 7
8 8
アクセスキー ID とシークレットアクセスキーを CLI に⼊⼒ 機密情報なので慎重に扱おう 9 9
Set up fullstack project $ npx create-react-app react-amplified --typescript $
cd react-amplified 今回は React の例 TypeScript は義務(過激派) 他にも Angular や iOS など主要なものは対応されてる 10 10
Initialize a new backend $ amplify init 質問がいくつか出てくるので答える Enter 連打で基本
OK 11 11
Install Amplify libraries $ yarn add aws-amplify @aws-amplify/ui-react aws-amplify AWS
との通信などが簡単にできるライブラリ @aws-amplify/ui-react ログイン画⾯などの UI 部品群 公式 には npm 使われてるけど yarn で追加してる create-react-app のデフォは yarn なので 12 12
Set up frontend // src/index.tsx import Amplify from "aws-amplify"; import
awsExports from "./aws-exports"; Amplify.configure(awsExports); Amplify に設定を⾷わせる 実態は AWS の各種サービスの ID などの設定 13 13
Amplify 準備完了! \イクゾー/ \デッデッデデデデ/ \カーン/ 14 14
Cognito 認証してみる $ amplify add auth $ amplify push 質問出てくるので答えると
Cognito のセットアップが完了す る push すると AWS に反映され Cognito が出来上がる ⼀部項⽬以外は amplify update auth で後から更新可能 15 15
動かしてみる サンプルコード $ yarn start 16 16
認証画⾯が出たら成功 17 17
⼀瞬でできた! サインアップ・サインイン・サインアウト パスワードリセット MFA 他にもカスタム認証だったり、 認証ログ取ったりといろいろできるゾ 18 18
実は... 発表資料作成 約 2h サンプル作成 約 10min 19 19
20 20
卍 Amplify is 爆速. 卍 21 21