- Backend Server: AWS Lambda - Serverless Infrastructure
- python3.11
- Curated requirements.in [basic dependency libs]
- Design Pattern followed: Creational-Singleton and Structural-Decorator Design Pattern
- Architecture: Event-Driven Asynchronous Architecture
Installation Guide for LocalStack support ecosystem
Installation Guide: https://docs.localstack.cloud/getting-started/installation/
Initiating the Localstack application server
localstack start # initialize
sudo chmod +x run_executor.sh
Run the command: /bin/bash run_executor.sh
Navigate to: `https://app.localstack.cloud/dashboard`
- Cloudwatch EventBridge
- Event Rule defined to periodically trigger Lambda action to scrape the Currency Conversion (daily basis).
- Once scraped, evaulate the fluctuated spot rate for enlisted currency for exchange and stored as time-series documents (NoSQL schema).
- API Gateway Resources
- Publically exposed GET method to fetch the Currency Spot Rate and Fluctuations for enlisted currencies.
- API Gateway service, being hosted on https://localhost.localstack.cloud:4566 domain to emulate the AWS ecosystem.
- Public Endpoint: http://localhost:4566/_aws/execute-api/\<apiId>/dev/api/v1/kaizen/fetch-currency-exchange/generate
- As to perform Modular Testing, execute the inline command: python3 worker_lambda.py
- For EventBridge moderation: report_generation_cron_event as placeholder value
- For APIGateway moderation: api_currency_exchange_event as placeholder value
- Code Snippet:
class Context:
invoked_function_arn = "test:dev"
print(
async_lambda_handler(
event=events.api_currency_exchange_event, context=Context()
)
)