A simple currency exchange tracking application using AWS Serverless environment and services. Application relies on European Central Bank Data (https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html)
- Exchange rates are fetched every day and stored in a dynamodb table
- The application exposes a public REST API endpoint that provides current exchange rate information for all tracked currencies and their change compared to the previous day for all the tracked currencies.
- So the customer can see current exchange rates
- Customer can monitor exchange rate changes as compared to the previous day
- To Do: Add single page web appliction to display the curency rates and a graph that shows the currency trends
- Python 3.9
- AWS ApiGateway
- AWS Lambda
- AWS DynamoDB
- AWS Events (Event Rules)
- AWS Cloudformation
- AWS SAM (Serverless Application Model)
- AWS CloudWatch
- AWS SAM CLI (v1.59.0)
├── Makefile
├── README.md
├── daily.xml
├── functions
│ ├── __init__.py
│ ├── db.py
│ ├── handlers.py
│ ├── helper.py
│ ├── requirements.txt
│ └── samconfig.toml
├── pyproject.toml
├── samconfig.toml
├── template.yaml
└── tests
├── __init__.py
├── integration
│ ├── __init__.py
│ └── test_api_gateway.py
├── requirements.txt
└── unit
├── __init__.py
└── test_handlers.py
First Install SAM CLI on your system then you can deply the app on AWS cloud or run locally via sam local start-api
# creates venv and installs the `/functions/requirements.txt`
make setup_local
# Paste your AWS access keys on the shell
export AWS_ACCESS_KEY_ID=<access-key>
export AWS_SECRET_ACCESS_KEY=<secret-key>
export AWS_DEFAULT_REGION=us-east-1
# Paste your AWS access keys on the shell
export AWS_ACCESS_KEY_ID=<access-key>
export AWS_SECRET_ACCESS_KEY=<secret-key>
export AWS_DEFAULT_REGION=us-east-1
# Create new S3 bucket manually and update s3_bucket key in samconfig.toml file
# Run below command to build project usinng SAM and deploy
make build_and_deploy_dev
make run_unit_tests
make run_integration_tests
Note: Application should be deployed to AWS before running the tests