Commit e4dd13ab2cf478c528b3fdfd5e3a4a08e23dacbe

Authored by Jan Vonka
1 parent f312d055c1
Exists in master

Update README (fix formatting)

Showing 1 changed file with 8 additions and 7 deletions   Show diff stats
... ... @@ -7,11 +7,10 @@ The project contain a lambda (HeartbeatRequestHandler) which writes the received
7 7 The request and response objects are build according to the docs:
8 8 https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-input-format
9 9  
10   -## Usage
  10 +## Build & Deploy
11 11  
12   -Use the following steps to deploy a stack:
  12 +Use the following steps to build & deploy a stack:
13 13  
14   -~~~
15 14 install and configure AWS CLI (note: the DAO tests that run during the build currently assume "eu-west-1" region)
16 15 ~~~
17 16 http://docs.aws.amazon.com/cli/latest/userguide/installing.html
... ... @@ -35,10 +34,12 @@ aws cloudformation deploy --stack-name <stack-name> --template heartbeat-templat
35 34 show details of stack after deployment
36 35 ~~~
37 36 aws cloudformation describe-stacks --stack-name <stack-name>
  37 +~~~
38 38  
39   -Obtain the APIs invoke url (top-level entrypoint):
  39 +## Call the API
  40 +
  41 +Obtain the API's invoke url (top-level entrypoint):
40 42  
41   -~~~
42 43 either from the AWS console
43 44 ~~~
44 45 http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html
... ... @@ -50,16 +51,15 @@ https://{restapi_id}.execute-api.{region}.amazonaws.com/{stage_name}/
50 51  
51 52 Send some heartbeat data:
52 53  
53   -~~~
54 54 use postman or curl. Here's an example with fake data:
55 55 ~~~
56 56 curl -X POST https://7a44anmr6e.execute-api.eu-west-1.amazonaws.com/Prod -d '{"repositoryId":" a1d48b32-8309-5c65-acdb-7202c8cd2f9e","feature":"Alfresco Content Services", "payload":{"users":"100","documents":"10000"}, "version":"6.0.0"}'
57 57 ~~~
58 58  
  59 +## Cleanup
59 60  
60 61 Later, you can use the following steps to delete a stack:
61 62  
62   -~~~
63 63 delete the stack using CF cli
64 64 ~~~
65 65 aws cloudformation delete-stack --stack-name <stack-name>
... ... @@ -67,6 +67,7 @@ aws cloudformation delete-stack --stack-name &lt;stack-name&gt;
67 67 check progress of stack deletion
68 68 ~~~
69 69 aws cloudformation describe-stacks --stack-name <stack-name>
  70 +~~~
70 71  
71 72  
72 73 ## Build plan
... ...