This small project consists of an ETL processor and pipeline that obtains the International Space Station's location in real-time using the ISS Open API. The processor writes historical positional data in an Amazon RDS Postgres database, and simulates a user who needs visualisation capabilities as a use case.
- Data ingestion: AWS Lambda function executes a containerised Python ETL script every 5 minutes.
- Storage: Amazon RDS Postgres instance for historial data storage.
- Orchestration: Amazon EventBridge for scheduling the Lambda function calls.
- Container registry: AWS Elastic Container Registry (ECR).
- Data visualisation: to be determined.
- AWS account with appropriate IAM permissions
- Docker installed on local environment
- Python 3.8+
- Local Postgres client for testing and local development
- AWS CLI configured
- Clone the repository
git clone https://github.com/bernie-cm/iss-lambda
cd iss-lambda- Configure AWS Resources
- Create an RDS Postgres instance.
- Set up an ECR repository.
- Configure appropriate KMS Key Policy.
- Create Lambda function.
- Configure EventBridge schedule.
- Environment variables
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_password
POSTGRES_HOST=your_rds_endpoint
Note
Here's a diagram of the system:
4. Build and push Docker image
docker build -t iss-tracker .
aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com
docker tag iss-tracker:latest aws_account_id.dkr.ecr.region.amazonaws.com/iss-tracker:latest
docker push aws_account_id.dkr.ecr.region.amazonaws.com/iss-tracker:latestiss-lambda
├── README.md
├── assets
│ ├── ISS API diagram.png
│ ├── ISS_plot.png
│ └── iss_project_banner.png
├── docker-compose.yaml
├── dockerfile
├── main.py
└── plot.pyCREATE TABLE iss_locations (
id SERIAL PRIMARY KEY,
timestamp TIMESTAMP,
latitude DECIMAL(9,6),
longitude DECIMAL(9,6),
);The project uses the ISS Open API:
- Endpoint:
http://api.open-notify.org/iss-now.json - No authentication required
- Rate limit: 1 request per second
- Update environment variables in AWS Lambda.
- Deploye Docker image to ECR.
- Configure EventBridge to use a schedule rule.
- Test the pipeline.
- Fork the repository.
- Create feature branch.
- Submit pull request.

