-
Notifications
You must be signed in to change notification settings - Fork 9
Serverless deployment
Jose Enrique Hernandez edited this page Aug 19, 2020
·
1 revision
The serverless infrastructure in the Attack Range deploys a lambda function, a rest api and two DynamoDB tables. The Attack Range deploys an own developed lambda function which can be found here.
This lambda function is a REST API backend for a notes application with the following endpoints:
description: hello world
example:
curl https://ia69sqylx6.execute-api.eu-central-1.amazonaws.com/prod/
response:
hello
description: list all public notes of the application
example:
curl https://zj0verlo1a.execute-api.eu-central-1.amazonaws.com/prod/public_notes | jq
response:
{
"Notes": [
{
"Header": "Deep Core",
"IsPublic": "1",
"Text": "the innermost brightly lit region of space, with a supermassive black hole at the center which binds the galaxy together. Densely-packed with stars, nebulae, and other anomalies, it is therefore thinly settled due to the resulting high radiation levels and lack of stable hyperspace routes.\n",
"TimeStamp": "1590753334.832866",
"UserName": "JetiMaster1"
}
...
description: list all notes (public and private) of the application. Two users are provisoned, the user names and password can be found under /serverless_application/data/users.txt.
example:
curl -u ChuckNorris:ChuckNorris123 -i -X GET https://zj0verlo1a.execute-api.eu-central-1.amazonaws.com/prod/notes
response:
{
"Notes":[
{
"Header":"Chuck Norris Joke #1",
"IsPublic":"1",
"Text":"Jaws stays on the beach when Chuck Norris swims.\n",
"TimeStamp":"1590753334.832829",
"UserName":"ChuckNorris"
},
...