(setq org-confirm-babel-evaluate nil)
(setq org-babel-sh-command "ssh default ")
;; customize the following variables:
;;(setq org-babel-load-languages
;;<<< '((emacs-lisp . t) (python . t) (clojure . t) (sh . t ) (perl . t)))
(setq org-babel-default-header-args:screen
'((:results . "raw")
(:session . "default")
(:cmd . "bash")
(:terminal . "/opt/X11/bin/xterm")))
(setq org-babel-screen-location "/usr/bin/screen")
echo "[default]" > ~/.aws/config
echo "region = eu-west-1" >> ~/.aws/config
grep aws_access_key_id ~/.boto-dashsoftexp >> ~/.aws/config
grep aws_secret_access_key ~/.boto-dashsoftexp >> ~/.aws/config
ls -la
Press “Ctrl-c c” in the BEGIN_SRC block to activate
aws dynamodb delete-table --table-name MusicCollection
aws dynamodb create-table --table-name MusicCollection --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1
aws dynamodb list-tables
aws dynamodb put-item \
--table-name MusicCollection \
--item '{
"Artist": {"S": "No One You Know"},
"SongTitle": {"S": "Call Me Today"} ,
"AlbumTitle": {"S": "Somewhat Famous"} }' \
--return-consumed-capacity TOTAL
> > > > > { “ConsumedCapacity”: { “TableName”: “MusicCollection”, “CapacityUnits”: 1.0 } }
aws dynamodb put-item \
--table-name MusicCollection \
--item '{
"Artist": {"S": "Acme Band"},
"SongTitle": {"S": "Happy Day"} ,
"AlbumTitle": {"S": "Songs About Life"} }' \
--return-consumed-capacity TOTAL
> > > > > { “ConsumedCapacity”: { “TableName”: “MusicCollection”, “CapacityUnits”: 1.0 } }
file:key-conditions.json
aws dynamodb query --table-name MusicCollection --key-conditions file://key-conditions.json
–endpoint-url has to be specified with each CLI call
aws dynamodb list-tables --endpoint-url http://localhost:8000
The raw version of dynamodb.txt can be executed step by step from within Emacs. Remember that 'aws-cli' has to be present on the host computer.