Companion Repository for the Apress Book:
"Deploying Secure Data Science Applications in the Cloud: From VMs to Serverless with AWS and Google Cloud"
π Official Book Page: Springer/Apress
π Purchase on Amazon: Amazon Store
π€ Connect with the Author: LinkedIn
This repository contains all the practical code examples, configurations, and deployment scripts from the book "Deploying Secure Data Science Applications in the Cloud." Each chapter folder provides hands-on implementations demonstrating how to securely deploy data science applications using modern cloud platforms and containerization technologies.
- Cloud Platforms: AWS, Google Cloud Platform (GCP)
- Containerization: Docker, Docker Compose
- Web Frameworks: Flask, Streamlit
- ML Deployment: Scikit-learn model serving, Pickle serialization
- Infrastructure: Nginx reverse proxy, SSL/TLS certificates
- CI/CD: Jenkins for ETL/ELT pipelines
- Security: HTTP Basic Authentication, Domain security, Subdomains
- Serverless: AWS ECS Fargate, Google Cloud Run
- Initial cloud setup and development environment configuration
- Streamlit example application
- SSL certificate configuration
- Nginx setup for HTTPS
- Docker Compose orchestration
- Multi-service deployment with Docker Compose
- Jenkins integration for CI/CD
- Flask and Streamlit application orchestration
- Nginx reverse proxy configuration
- Subdomain security implementation
- Advanced Nginx configuration
- Multi-service routing
- GCP-specific deployment configurations
- Cloud-native service orchestration
- Platform comparison examples
- Flask Application: Secure ML model serving API
- Streamlit Dashboard: Interactive data science applications
- Containerized serverless deployment
- Flask Application: Transaction scoring API with authentication
- Streamlit Application: Sample size calculator
- AWS ECS Fargate and container-based serverless options
- ETL Scripts: Multi-cloud data processing (AWS S3 β GCP Storage)
- Jenkins Configuration: Automated data pipeline execution
- Jupyter Notebooks: Interactive ETL development
- Multi-cloud Dashboard: Connects to both AWS S3 and GCP Storage
- Data Visualization: Interactive charts and data exploration
- Cloud Storage Integration: Seamless data access across platforms
- ML Model API: Random Forest model serving
- Authentication: HTTP Basic Auth implementation
- Logging: Comprehensive request/response logging
- Error Handling: Robust exception management
- Docker and Docker Compose
- AWS CLI (configured with appropriate credentials)
- Google Cloud SDK (with service account JSON)
- Python 3.8+
-
Clone this repository:
git clone <repository-url> cd deploy-secure-ds-apps-book
-
Navigate to any chapter directory:
cd "Chapter 10 Serverless Deployment with AWS"
-
Follow the specific setup instructions in each chapter's README or configuration files.
cd "Chapter 05 Deploying More Robust Applications (Jenkins, Flask, and Streamlit)"
export JENKINS_UID=$(id -u)
export JENKINS_GID=$(id -g)
docker-compose up -d
- SSL/TLS certificate management
- HTTP Basic Authentication
- Secure subdomain configuration
- Environment variable management
- Service isolation with Docker
- Pickle model serialization/deserialization
- REST API endpoints for model inference
- Error handling and logging
- Authentication for production APIs
- AWS S3 and GCP Storage integration
- Platform-agnostic deployment strategies
- Cloud-specific optimizations
- Serverless vs. container trade-offs
- Jenkins-based ETL/ELT workflows
- Multi-cloud data synchronization
- Automated data processing schedules
- Interactive development with Jupyter
- Nginx reverse proxy configuration
- Docker container orchestration
- Health checks and monitoring
- Scalable architecture patterns
deploy-secure-ds-apps-book/
βββ Chapter 02 SSH to the EC2 Instance with VSCode and Necessary Setup/
βββ Chapter 04 Domain Name and SSL Certificates/
βββ Chapter 05 Deploying More Robust Applications (Jenkins, Flask, and Streamlit)/
βββ Chapter 06 Create and Secure your Subdomains/
βββ Chapter 07 How to Setup This Infrastructure On Google Cloud Platform (GCP)/
βββ Chapter 09 Serverless Deployment with Google Cloud Run/
βββ Chapter 10 Serverless Deployment with AWS/
βββ Chapter 11 Demo Using Jenkins as an ETL ELT Platform for Data Science/
βββ Chapter 12 Demo Streamlit/
βββ Chapter 13 Demo Flask/
This repository demonstrates production-ready security practices:
- Never commit credentials or API keys
- Use environment variables for sensitive configuration
- Implement proper authentication mechanisms
- Configure SSL/TLS for all public-facing services
- Follow principle of least privilege for cloud permissions
Each chapter may require specific setup:
- AWS Chapters: AWS CLI configured with appropriate IAM permissions
- GCP Chapters: Service account JSON file and appropriate GCP project setup
- Jenkins Chapters: Docker and sufficient system resources
- SSL Chapters: Valid domain name and certificate files
This repository serves as companion code for the Apress book. For errata, improvements, or questions:
- Check the book's official errata page
- Create an issue for technical problems
- Submit pull requests for bug fixes
Code examples are provided for educational purposes as companion material to the Apress book. Please refer to the book's licensing terms for usage guidelines.
"Deploying Secure Data Science Applications in the Cloud: From VMs to Serverless with AWS and Google Cloud" is a comprehensive guide for Data Scientists, ML engineers, and DevOps practitioners who need to turn prototypes into secure, scalable production services. This step-by-step book bridges the gap between building Data Science applications and Machine Learning models, and deploying them effectively in real-world scenarios.
- Deploy end-to-end data science applications with cloud infrastructure setup
- Use industry-standard tools like Docker, Nginx, Flask, Streamlit, and Jenkins
- Structure and expose machine learning models via APIs for production use
- Explore modern serverless architectures with AWS ECS Fargate and Google Cloud Run
- Develop secure cloud deployment practices from the ground up
Beginning to intermediate professionals with Python knowledge, including Data Scientists, ML Engineers, Data Engineers, and Data Analysts looking to securely deploy projects in production environments.
Release Date: September 2025
Publisher: Apress (Springer Nature)
Author: Lucas Henrique Benevides e Braga
For detailed instructions on each chapter, navigate to the respective chapter directory and refer to the specific configuration files and documentation.