Created a calculator lambda function that adds, subtracts, multiplies and divides two operators. Deployed the lamda function on AWS and built a RESTful API for the the calculator lambda function using AWS API Gateway.
git clone git@bitbucket.org:unaizafaiz/unaiza_faiz_hw6.git
- Open browser
- Type in the URL "https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator"
- In order to perform an operation 3 arguments need to be passed: op1 (operator1), op2 (operator2) and opnd (operand)
- Example:
- Subtract: https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator?op1=60&op2=256&opnd=-
- Multiply: https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator?op1=60&op2=256&opnd=*
- Divide: https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator?op1=60&op2=256&opnd=/
- Also checks for divide by zero error https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator?op1=60&op2=0&opnd=/
- Add operation: https://tfepd2yxg0.execute-api.us-east-1.amazonaws.com/test/calculator?op1=60&op2=256&opnd=+
The Add operation works when testing the gateway but does not recognize the operand using the URL! Please see screenshot attached.