I'd recommend using a framework such as the Serverless Framework[1], Chalice[2], Dawson[3], or Zappa[4]. As any other (web) development project, using a framework will alleviate a big part of the pain involved with a new technology.
Anyways, I'd recommend starting from learning the tools without using a framework first. You can find two coding sessions I published on Youtube[5][6].
Then you can run this Python code to extract/merge into one single file:
import json
with open('res.json', 'r') as f, open('names.json', 'r') as ff:
res = json.load(f)
names = json.load(ff)
for res_id, res_name in names.iteritems():
print("%s:" % res_name)
for id1, id2 in res[str(res_id)].get('parents', []):
print("\t %s + %s" % (names[str(id1)], names[str(id2)]))
Expected output:
glacier:
ice + mountain
cart:
wheel + wood
nerd:
human + glasses
doctor:
human + hospital
wagon:
cart + horse
newspaper:
paper + paper
paper:
wood + pressure
I wanted to see it in graph form, so a wrote I did pretty much the same but printed a dot code and piped that into dot. It was a disaster: A huge, unreadable mess. Try yourself if you're feeling adventurous:
import json
with open('base.560.json') as f:
base = json.load(f)
with open('names.560.json') as f:
names = json.load(f)
print('digraph {')
for elnum, name in names.items():
print(f'e{elnum} [label="{name}"];')
for elnum, body in base.items():
for el1, el2 in body.get('parents', ()):
print(f'e{el1} -> e{elnum};')
print(f'e{el2} -> e{elnum};')
print('}')
# python3.6 code.py | dot -Tpng dot.png
It really depends on how you use it. If you structure your code well and you mostly use it to build RESTful APIs (which is what dawson is meant for), you will be able to easily migrate it to any other system. Especially if you use Lambda + RDS, you won't need too much work to re-deploy the same database and functions elsewhere (either another serverless vendor or your own infrastructure).
Well, everything is still based on CPU registers, but I guess everybody here prefers the abstraction provided by C, Python, Java, Ruby, JavaScript, or Go.
That's not the reason why people don't call JavaScript "computerless" or "codeless" though.
I think serverless is a bit sensationalistic and ultimately unhelpful of a name. I don't blame new projects for adopting the term since it's already in the public awareness, but I can't say I'm a fan.
Yes, I think you can do much better with IAM. Experienced AWS users will not follow such a suggestion, as I suppose that doc is meant to provide a quickstart for beginners.