Blame view

README.md 924 Bytes
a847fc840   Alex Mukha   Refactored the co...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  # Serverless Heartbeat
  
  
  ## Overview
  
  The project contain a lambda (HeartbeatRequestHandler) which writes the received data to DynamoDB.
  The request and response objects are build according to the docs:
  https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-input-format
  
  ## Usage
  
  Use the following steps to deploy a stack (aws cli should be installed and configured):
  * build the code using maven:
  ~~~
  mvn clean nstall
  ~~~
  * create S3 bucket:
  ~~~
  aws s3 mb s3://<bucket-name>
  ~~~
  * package the template and upload the jar to the bucket:
  ~~~
  aws cloudformation package --template-file heartbeat-template.yaml --output-template-file heartbeat-template-output.yaml --s3-bucket <bucket-name>
  ~~~
  * deploy the stack in CF:
  ~~~
  aws cloudformation deploy --stack-name <stack-name> --template heartbeat-template.yaml --capabilities CAPABILITY_IAM
  ~~~