Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS SDK for RubyでDynamoDBを操作してみた
Search
Naoto Enokawa
October 18, 2014
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS SDK for RubyでDynamoDBを操作してみた
JAWS-UG沖縄 CMS祭り 前夜祭LT資料です。
Naoto Enokawa
October 18, 2014
Transcript
21 slides
AWS SDK for Ruby V2Ͱ DynamoDBΛૢ࡞ͯ͠Έͨ Naoto Enokawa
ࣗݾհ ӫ ేʢ͑ͷ͔Θ ͳ͓ͱʣ ԭೄࠃࡍେֶ4࣍ ಛٕɿDJʢEDMͱ͔ʣ झຯɿҰ؟ϨϑʢEOS kiss X5ʣ
DynamoDBʹϦΞϧλΠϜͰ πΠʔτΛ֨ೲ͢Δ ͬͨ͜ͱ
ͳΜͰʁʁ
None
MacBookͷഎ໘Λ ࣗຫ͋͠͏WebαʔϏε
ʮMacFriendsʯͰݕࡧʂ http://macfriends.net/
None
ઌੜʮσʔλϕʔε͑ʯ
DBͳʹ͓͏… RDSͬͨΒෛ͚ͨײ͕͢͡Δww
RDS͏ΑΓDynamoDB ͬͨํ͕҆͘ࡁΈͦ͏ʂʂ
༻ͨ͠AWSαʔϏε DynamoDBɿશϚωʔδυNoSQLɺ KeyValueܕɺAPIܦ༝Ͱར༻͢ΔɺSSDͰ͍ AWS SDK for RubyɿRubyͰAWSͷϦιʔεΛ ૢ࡞͢Δ͜ͱ͕Ͱ͖ΔɺଞʹɺJavaɺ JavaScriptɺPhytonɺPHPɺ.NETɺNode.jsɺ iOSɺAndroid
Πϝʔδਤ DynamoDB ΅͘ͷMac RubyͰͿͪࠐΉʂʂ
σϞ
create_table.rb resp = dynamo_db.create_table( table_name: 'tweets', key_schema: [ { attribute_name:
'tweet_id', key_type: 'HASH', }, ], attribute_definitions: [ { attribute_name: 'tweet_id', attribute_type: 'N', }, ], provisioned_throughput: { read_capacity_units: 1, write_capacity_units: 1, }, )
put_item.rb client = TweetStream::Client.new ! client.track("#macfriends") do |status| if !status.text.index("RT")
puts "@" + status.user.screen_name + " : " + status.text resp = dynamo_db.put_item( table_name: 'tweets', item: { 'tweet_id' => status.id, 'user_id' => status.user.id, 'screen_name' => status.user.screen_name, 'tweet_text' => status.text, } ) end end
None
ࠓޙͷ՝ • ݟ͑ΔԽ • ϒϥβ্ͰDBͷใΛදࣔͤ͞Δ • herokuʹσϓϩΠ
None
/enokawa/tweetstream_dynamodb
AWS SDK for Ruby V2Ͱ DynamoDBΛૢ࡞ͯ͠Έͨ Naoto Enokawa
More Decks by Naoto Enokawa
See All by Naoto Enokawa
CircleCI Orbs にコントリビュートした話 / Story contributed to CircleCI Orbs
enokawa
0
720
AWS re:Invent 2017行ってきました報告 / JAWS-UG Okinawa 20180106
enokawa
1
340
Roadworkerではじめる大量DNS移行 / Codenize Meetup
enokawa
0
3.6k
AWS構築のハマりポイントを詳しく解説 / Cloud on the BEACH 2016
enokawa
3
1.5k
JAWS DAYS 2016 ランチセッション
enokawa
0
650
AWS初心者がCodenize.toolsでInfrastructure as Codeした話/jawsug-beginner2-lt
enokawa
0
860
cloudpackインターン成果報告
enokawa
0
2.1k
ownCloud on AWS in Hackers Champloo 前夜祭 #hcmpl
enokawa
0
640
#jawsug 沖縄 勉強会「AWS触ってみたけどその後どうしてる?」
enokawa
0
110
Other Decks in Programming
See All in Programming
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
260
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
210
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
380
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
360
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
420
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
Ruby から Emacs を操作したい
phigasui
0
330
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
オーケストレーション記述言語 Katari
yukikurage
0
270
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
770
Featured
See All Featured
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Building the Perfect Custom Keyboard
takai
2
960
Believing is Seeing
oripsolob
1
280
4 Signs Your Business is Dying
shpigford
187
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
240
ラッコキーワード サービス紹介資料
rakko
5
5.9M
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
Scaling GitHub
holman
464
140k
Music & Morning Musume
bryan
48
7.5k