Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
(今更)Amplifyさっくり体験
Search
papix
July 06, 2021
Technology
0
820
(今更)Amplifyさっくり体験
papix
July 06, 2021
Tweet
Share
More Decks by papix
See All by papix
YAPC::Kyotoの「全て」 / All of "YAPC::Kyoto"
papix
0
1.4k
イベントの中の人 / Inside the Events
papix
0
230
2022年に始めるPerlでWebサービス開発(趣味)
papix
0
460
ワーケーションに関する考察
papix
3
2.1k
はてなにおけるGitHub Actions活用事例 / GitHub Actions in Hatena
papix
0
2k
ミススペルを発見するmisspellのご紹介 / Introduce misspell
papix
0
1k
「知らなかった」を聞きに行く 〜海外カンファレンス参加のススメ〜 / builderscon 2019
papix
0
320
Perl in Japan
papix
0
2.5k
Perlでもトレーシングがしたい! 〜はてなブログの"見える化"への挑戦〜 / Tracing in Perl
papix
1
1.2k
Other Decks in Technology
See All in Technology
[FOSS4G 2019 Niigata] AIによる効率的危険斜面抽出システムの開発について
nssv
0
310
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
いざ、BSC討伐の旅
nikinusu
2
780
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
860
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
290
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Featured
See All Featured
Statistics for Hackers
jakevdp
796
220k
Practical Orchestrator
shlominoach
186
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
We Have a Design System, Now What?
morganepeng
50
7.2k
The Cult of Friendly URLs
andyhume
78
6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How to Ace a Technical Interview
jacobian
276
23k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Happy Clients
brianwarren
98
6.7k
Transcript
(ࠓߋ)Amplifyͬ͘͞Γମݧ Kichijoji.pm #27 papix (@__papix__)
ࣗݾհ • papix (id:papix / @__papix__) • גࣜձࣾͯͳ WebΞϓϦέʔγϣϯΤϯδχΞ (2017ʙ)
• ϒϩάMediaνʔϜ → ϚϯΨνʔϜ • Ұൠࣾஂ๏ਓJapan Perl Associationཧࣄ • ϒϩά: https://papix.hatena(blog.(com|jp)|diary.jp)
AWS Amplify • ެࣜᐌ͘... • AWS Amplify ɺͦΕͧΕΛ࿈ܞͤͨ͞ΓݸผͰ༻ͨ͠ΓͰ͖ ΔɺπʔϧͱαʔϏεͷηοτͰ͢ɻ͜ΕΒͷػೳʹΑΓɺϑϩϯ τΤϯυΣϒ͓ΑͼϞόΠϧͷσϕϩούʔ͕ɺAWS
ʹΑΔε έʔϥϒϧͳϑϧελοΫΞϓϦέʔγϣϯΛϏϧυͰ͖ΔΑ͏ʹ ͠·͢ɻ
࡞ͬͨͷ: SmartP • ࣾͷ։ൃ߹॓(3ؒ)Ͱ࡞ͬͨϓϩμ Ϋτ • ٕज़ελοΫ: Amplify / Next.js
(SSR) • Πϕϯτͷܭը/ڞ༗/ه(อଘ)͕Ͱ͖ ΔWebαʔϏε
AWS AmplifyͰྑ͔ͬͨ͜ͱ • CLIͰαΫοͱϦιʔε͕ੜ͑Δ • ňamplify auth addʼnͰCognito͕ੜ͑Δ • ňamplify
storage addʼnͰS3͕ੜ͑Δ • ňamplify api addʼnͰGraphQL endpoint (AppSync)͕ੜ͑Δ
AWS AmplifyͰྑ͔ͬͨ͜ͱ • AppSync͕ศར • GraphQLͷschemaΛॻ͍ͯdeploy͢Δͱγϡοͱಈ͘ • Subscriptionͷॲཧ࠷ݶͷίʔυͰ࣮Ͱ͖Δ
AWS AmplifyͰGraphQLͷSubscription // ActivityͷՃΛsubscribe͢Δ const createActivitySubscription = API.graphql(graphqlOperation(onCreateActivity)) as Observable<Record<string,
unknown>> ; createActivitySubscription.subscribe( { next: e => { const createdActivity = e.value.data.onCreateActivity ; // createdActivity͕, Ճ͞ΕͨActivit y // Α͠ͳʹॲཧΛ͢Δ } });
AWS AmplifyͰྑ͔ͬͨ͜ͱ • ࠷খݶͷ࡞ۀͰ࠷ݶಈ͘ͷ͕࡞ΕΔ • ೝূ, σʔλͷཧ, ը૾ͷอଘͳͲશͯAmplifyʹͤΒΕΔ • ࠓճͷ։ൃ߹॓ͷΑ͏ͳ,
ϓϩτλΠϐϯάʹศར
AWS AmplifyͰ͔ͬͨ͜͠ͱ • ͪΐͬͱڽͬͨ͜ͱΛ͠Α͏ͱ͢Δͱେม(ͳ͜ͱ͕͋Δ) • ࣾͷ։ൃ߹॓Ͱར༻͢ΔͷͩͬͨͷͰ, CognitoͰϝʔϧΞυϨ εͷυϝΠϯͰ੍ݶΛ͔͚Α͏ͱͨ͠ • Կނ͔͏·͘ߦ͔ͣ,
ࢼߦࡨޡͷϩάΠϯ͕Ͱ͖ͳ͘ͳͬͨ... • ࠷ऴతʹ, 3ؒͰ4ճΠν͔ΒAmplifyͰڥΛ࡞Δ͜ͱʹͳͬͨ • ௨শňAmplifyڥߏஙRTAʼn
AWS Amplify ײ • ϓϩτλΠϐϯάʹຊʹ࠷ద • "ຊ࣭"ʹूத͢Δ͜ͱ͕Ͱ͖ͨ • ࣮ࡍʹαʔϏεͱͯ͠ఏڙ͢Δࡍʹ͏͔ཁݕূ •
บ͕͋Δ͕ଟ͍ • ň͠Ұൠʹఏڙ͢ΔͳΒGo(GraphQL) + Next.jsͰ࡞Γ͔͢ ͳ...ʼnͱ͍͏ձΛͨ͠
·ͱΊ • ࠓߋAWS Amplify৮ͬͯΈ·͕ͨ͠, ૾ͷ100ഒศརͩͬͨ • Կ͔αΫοͱಈ͘WebαʔϏε࡞Γ͍͍͖͍ͨ࣌ͬͯͨ