Name: Jeet Mehta
UIN: 668581235
Youtube Link: https://www.youtube.com/watch?v=sqcKGheS-hY
AWS URL: https://d4lvtsa96b.execute-api.us-east-2.amazonaws.com/testing/lambda_function
Given the input of timestamp and interval have to check whether that timestamp is present or not. Here, interval = Range of (giventimestamp - dT, giventimestamp + dT)
If timestamp is found we have to return a md5 generated hash code or else a 400 level client response since timestamp is not found.
The environment used for the project was:
- OS: Windows 10
- IDE: IntelliJ IDEA 2021
- Scala, Python
- AWS: EC2, Lambda & API Gateway
We start off by creating a binary search for our implementation. We then made the created the getIndex function to get the leftmost and rightmost timestamp so that our interval is defined and our implementation to search our timestamp begins.
Once the timestamp is found which matches the regex pattern, a 200 response will be sent and a MD5 generated hash code will be returned.
Java Installation:
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x54_bin.rpm
rpm -ivh jdk-17_linux-x54_bin.rpm
SBT Installation:
curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo
sudo su
mv sbt-rpm.repo/etc/yum.repos.d/
yum install sbt
scp-i <path where key pair is key.pem> -r <path of the main file> ec-2 user@ec2-instance url:~/
scp -i <path where key pair is key.pem> <path of dailyrun.sh> ec-2 user@ec2-instance url:~/
- Clone the project on your local machines using
- Build the project
- Execute sbt clean compile
- Execute sbt clean compile run
- Then you will be asked which main is to executed: Choose Rest client or Grpc
- Open a new terminal in case of gRPC then execute sbt. And then execute runMain Client.lambdaGrpcClient