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
開発で使える AWS の API 操作を模倣する (OSS) ツールを探してみた/JAWS-U...
Search
Yohei Kawahara
October 19, 2018
1
1.2k
開発で使える AWS の API 操作を模倣する (OSS) ツールを探してみた/JAWS-UG Kagoshima Vol.8
JAWS-UG鹿児島勉強会 Vol.8 (
https://jawsug-kagoshima.doorkeeper.jp/events/79902
) でトークさせて頂く死霊です.
Yohei Kawahara
October 19, 2018
Tweet
Share
More Decks by Yohei Kawahara
See All by Yohei Kawahara
20191002_CircleCIMeetupFukuoka#2
inokappa
1
810
kix_009_20190429
inokappa
0
810
2019-04-18 CircleCI Meetup Fukuoka #1
inokappa
2
8k
隙間時間を使って exercism.io を始め隊 | リモートで勉強会 #2
inokappa
0
400
Congratulations fukuokarb#100
inokappa
0
3.9k
moto を 'もっと' 使おう/PyFukuoka#4
inokappa
0
4.4k
github-enterprise-user-kai-desuyone
inokappa
0
100
Elixir and AWS Tutorial
inokappa
0
540
AWS Step Functions で検討する crontabless architecture/20170824_serverless_meetup_fukuoka#1
inokappa
1
740
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
GraphQLとの向き合い方2022年版
quramy
43
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Fireside Chat
paigeccino
34
3k
Site-Speed That Sticks
csswizardry
0
23
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Into the Great Unknown - MozCon
thekraken
32
1.5k
A Tale of Four Properties
chriscoyier
156
23k
Transcript
։ൃͰ͔ͭΏͬ AWS ͷ API ૢ࡞Λ฿͢Δ πʔϧΛΈ͚ͯ͠Έͨ1 JAWS-UG ࣛࣇౡษڧձ Vol.8 @inokara
1 ࣛࣇౡห༁: ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ (OSS) πʔϧΛ୳ͯ͠Έͨ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 1
ࢲ • ݪ ༸ฏ (͔ͬͺ) • ΞΠϨοτגࣜձࣾ • ࣛࣇౡग़Ͱ͝Θ͢ •
Github: inokappa • twitter: @inokara • Facebook: inokappa ࣮Ոਅ࠭ͳͷͰ, ࠙ձ͕ऴΘͬͨΒ ਅ࠭ʹؼΓ·͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 2
એ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG
ࣛࣇౡษڧձ Vol.8 3
JAWS-UG Ԭۙล͔Β͖·ͨ͠ʂ ΄΅ຖि͘͘ձͬͯ·͍͢ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ
| JAWS-UG ࣛࣇౡษڧձ Vol.8 4
Զͷπʔϧζ oreno.tools ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 5
એ ऴΘΓ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 6
AWS ͷ API ૢ࡞ͬͪ ͍Ί࣮ͬߦͬ࣌͢ ۓுͬ͢Ͳͳʔ2 2 ࣛࣇౡห༁: AWS ͷ
API ૢ࡞ΛॳΊ࣮ͯߦ͢Δ࣌ۓு͠·͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 7
γεςϜ։ൃͰ ίετͰ͚ͬͩ͘ ͔͑ͨʔ3 3 ࣛࣇౡห༁: γεςϜ։ൃͰίετग़དྷΔ͚͍ͩ͑ͨͰ͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API
ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 8
ςετͰ ࣮ϦιʔεΛ͔͔ͱ ͓͡Ͳͳ͋ʔ4 4 ࣛࣇౡห༁: ςετͰ࣮ϦιʔεΛ৮Δͷͬͯා͍Ͱ͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API
ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 9
ͦ͛ͳօ͞Μʹ Ͳͯ͠Μ࿕ใͰ͢5 5 ࣛࣇౡห༁: ͦΜͳօ͞Μʹ͓ͦΒ͘࿕ใͰ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ
OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 10
AWS ͷ API ૢ࡞Λ฿, API ޓ ͷ OSS ͕ ৭ʑͱ͍͋͢6
6 ࣛࣇౡห༁: AWS ͷ API ૢ࡞Λ฿, API ޓ ͷ OSS ͕৭ʑͱଘࡏ͍ͯ͠·͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 11
ͦ͛ͳ OSS Λ͍͔ͬ͘ ݟસͬͯΈͨ͠7 νΣετʔʂʂʂ 7 ࣛࣇౡห༁: ͦΜͳ OSS Λز͔ͭݟસͬͯΈ·ͨ͠.
։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 12
DynamoDB Local • https://docs.aws.amazon.com/ja_jp/amazondynamodb/ latest/developerguide/DynamoDBLocal.html • DynamoDB ͷجຊతͳػೳΛϩʔΧϧڥͰఏڙ, AWS Φϑ
Ογϟϧπʔϧʂ • σʔλͷ put ग़དྷΔ͠, scan ग़དྷΔʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 13
SAM Local • https://github.com/awslabs/aws-sam-cli • Lambda ؔ API Gateway ΛϩʔΧϧڥͰ࣮ߦग़དྷΔʂ
• S3 DynamoDB ͷαʔϏεͷݺͼग़͠ΛΤϛϡϨʔτʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 14
localstack • https://github.com/localstack/localstack • Lambda ͱ͔ API Gateway ͱ͔ϝδϟʔͳαʔϏεͷ API
Λ αϙʔτʂ • Web UI ͕༻ҙ͞Ε͍ͯΔʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 15
moto (moto_server) • https://github.com/spulec/moto • Python ͷ mock ϥΠϒϥϦ •
αϙʔτ͢ΔαʔϏε͕ localstack ΑΓ͍͔ • ϥΠϒϥϦ൛ͷ moto ͱαʔόʔ൛ͷ moto_server ͕༻ҙ͞ Ε͍ͯΔ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 16
elasticmq • https://github.com/adamw/elasticmq • SQS ޓͷΠϯλϑΣʔεΛఏڙʂ • Scala Ͱ࣮ ։ൃͰ͑Δ
AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 17
minio • https://github.com/minio/minio • S3 API ޓͷΦϒδΣΫτετϨʔδ • S3 ͷΑ͏ͳ
Web UI උ͍͑ͯΔ ͔ͳΓͷߴػೳͰ SDK ༻ҙ͞Ε͓ͯΓ, ଞͷΫϥυαʔ ϏεΦϯϓϨ্ʹల։࣮ͯ͠ࡍʹӡ༻͢Δ͜ͱఆ͞Εͯ ͍Δײ͡Ͱ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 18
dynalite • https://github.com/mhart/dynalite • DynamoDB ͷػೳΛఏڙ͢Δ࣮ kinesalite • https://github.com/mhart/kinesalite •
Kinesis Stream ͷػೳΛఏڙ͢Δ࣮ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 19
Ұཡ (1) ໊લ ରαʔϏε ϥΠηϯε DynamoDB Local DynamoDB Amazon ϥΠηϯε
SAM Local Lambda ଞ Apache License 2.0 localstack Lambda ଞ Apache License 2.0 moto EC2 ଞ Apache License 2.0 ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 20
Ұཡ (2) ໊લ ରαʔϏε ϥΠηϯε elasticmq SQS Apache License 2.0
minio S3 Apache License 2.0 dynalite DynamoDB MIT License kinesalite Kinesis MIT License ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 21
୳ͤͬͱ͋Δͣ... ͡ΌͬͲΜ... ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 22
ग़དྷΕ...σϞ ͜ΕΒͷπʔϧ HTTP ͷΤϯυϙΠϯτΛఏڙ͍ͯ͠ΔͷͰ, ҎԼͷΑ͏ʹ, ΦϓγϣϯͰΤϯυϙΠϯτΛࢦఆͯ͠ར༻͠ ·͢.8 aws --profile=dummy \
--endpoint=http://xxx.xxx.xxx.xxx:1234 \ s3 ... 8 AWS CLI Ͱͷར༻ྫͰ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 23
࠷ޙʹ • ࣮ϦιʔεΛ࿔ΔલͷૉৼΓʹΦεεϝ͡ΌͬͲʂ • ͋͘·Ͱ։ൃ༻్͓ࢼ͠༻్Ͱ͍ͬͯ͘Μͤʂ • ୳ͤͬͱ৭ʑͱग़ͯ͘Δͣ͡ΌͬͲͳ͋ʂ • Let's ΤϯδϣΠ
AWS !! ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 24
ᄠ͔͍͜ ΅͔͍ ᄠ͜Α͔ͬ ͻͬ !! ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ
OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 25
։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG
ࣛࣇౡษڧձ Vol.8 26