Architectural Overview – Designing a Log Pipeline
Creating a Seamless Data Flow from AWS S3 to Microsoft Sentinel

Author's Note: This post weaves technical truths with dramatized experiences. While the technical implementations are accurate, identifying details have been modified to maintain confidentiality.
Introduction
In our previous post, we discussed how security systems that only export logs to AWS S3 create a critical gap in real-time threat detection. Today, we'll explore the architectural blueprint that bridges this gap between AWS S3 and Microsoft Sentinel. This architecture isn't just theoretical—it's battle-tested and has significantly improved our ability to detect and respond to security threats in real-time.
The Real-World Challenge
When I first tackled this problem as a Junior Cloud Security Engineer, the stakes were high. Our SOC team was struggling with delayed threat detection due to manual log ingestion processes. During one particularly stressful incident, we missed a potential data exfiltration attempt because our logs were sitting in S3 for hours before reaching Sentinel. This experience drove home the need for a robust, automated solution.
Architectural Overview
Our log pipeline is built around three key components, each carefully designed to ensure reliable, secure, and efficient log transfer:
1. AWS S3 Log Storage
AWS S3 (Simple Storage Service) serves as the initial repository where your security systems deposit their logs. Think of it as a secure digital filing cabinet where all your security data is stored before processing.
S3 doesn't just passively store logs—it actively notifies your custom Python connector when new logs arrive through event notifications. This is crucial for achieving near real-time monitoring instead of periodic batch processing.
Real-World Analogy: Imagine S3 as a post office with automated mail sorting. When security logs arrive (like incoming mail), S3 immediately notifies your Python connector (like sending a text message to the recipient) that new mail has arrived, rather than waiting for someone to check the mailbox.
2. Python Connector
The Python connector is essentially a custom-built bridge that retrieves logs from S3, processes them into a format Microsoft Sentinel can understand, and delivers them to their final destination. It's responsible for the critical transformation work between the two systems.
The connector responds to S3 notifications, retrieves the new logs, performs necessary parsing and formatting, groups them into efficient batches, and securely transmits them to Sentinel's ingestion API.
Real-World Analogy: Think of the Python connector as a language translator who picks up documents written in "AWS language," translates them to "Sentinel language," and delivers them in properly organized batches for maximum efficiency.
3. Microsoft Sentinel Ingestion API
This API serves as the entry point for logs into your SIEM (Security Information and Event Management) system. It accepts the formatted logs from your Python connector and makes them available for security analysis and threat detection.
The API receives the processed log batches from your Python connector, validates them, and feeds them into Sentinel's analytics engine for correlation with other security data.
Real-World Analogy: The Sentinel API is like the receiving department of a security operations center. It accepts properly formatted security intelligence reports, verifies their formatting, and distributes them to security analysts for immediate review and action.
Design Considerations
Our architecture addresses several critical requirements:
Scalability
Our architecture scales dynamically based on log volume. During security incidents, log volumes can spike dramatically—sometimes increasing 10x within minutes. Our system automatically adjusts processing resources to handle these spikes without manual intervention, ensuring no logs are missed during critical security events.
Reliability
Security logs are too valuable to lose. Our implementation includes multiple layers of redundancy, from the durable S3 storage to the retry mechanisms in our Python connector. Even during system failures, logs are preserved and processed once systems recover, ensuring complete audit trails for compliance and investigation purposes.
# Example: Robust error handling implementation
def process_logs(self, batch):
# Initialize retry counter to track how many attempts we've made
retry_count = 0
# Continue attempting to process logs until we succeed or exhaust retries
while retry_count < MAX_RETRIES:
try:
# Attempt to send the batch to Sentinel
self.send_to_sentinel(batch)
# If successful, exit the retry loop
break
except TransientError:
# For temporary failures (like network issues), increment the retry counter
retry_count += 1
# Wait before retrying, using exponential backoff to avoid overwhelming the system
time.sleep(BACKOFF_FACTOR * retry_count)
except FatalError:
# For permanent failures (like authentication issues), move to dead letter queue
self.dead_letter_queue.send(batch)
# Exit the retry loop as further attempts would be futile
break
This code implements a resilient retry mechanism for sending logs to Microsoft Sentinel. It distinguishes between temporary issues (like network interruptions) that warrant retries and permanent failures (like authentication problems) that require human intervention. The exponential backoff strategy (increasing wait time between retries) prevents overwhelming the system during outages while ensuring timely delivery under normal conditions.
Security
Moving security logs between systems creates potential new attack vectors. Our architecture encrypts all data in transit using TLS 1.3, implements strict access controls using IAM roles with least privilege, and validates log integrity using hash comparisons before and after transmission.
Visual Blueprint
Enhanced Architecture Diagram
This diagram illustrates the complete flow of data from security systems to Microsoft Sentinel, including estimated processing times at each stage:
Error Handling Visualization
This flowchart shows our comprehensive error handling strategy, distinguishing between transient and fatal errors:
Batch Processing Diagram
This diagram demonstrates how we optimize log batching for efficient transmission:
Implementation Insights
While the architecture looks straightforward on paper, several key decisions significantly improved our implementation:
Batch Processing Optimization
- Found optimal batch size of 256KB for Sentinel ingestion
- Implemented dynamic batching based on log types
- Added compression for efficient transfer
Error Handling Strategy
- Implemented circuit breakers for API protection
- Created dead-letter queues for failed messages
- Added detailed logging for troubleshooting
Performance Monitoring
- Set up metrics for latency tracking
- Implemented health checks for each component
- Created alerting for processing delays
Validation and Testing
Before deploying to production, we validated our architecture through:
Load Testing
- Simulated peak log volumes
- Verified scaling behavior
- Measured end-to-end latency
Failure Scenarios
- Tested network interruptions
- Simulated API outages
- Verified data consistency after recovery
Explore the Code on GitHub
Want to get a closer look at the foundation of this architecture? You can find the code for our Python connector and related diagrams in our public GitHub repository
Feel free to browse the code, contribute, or use it as inspiration for your own projects!
Next Steps
In upcoming episodes, we'll dive deeper into the Python Connector:
- Episode 3: Deep dive into AWS S3 connectivity and log processing
- Episode 4: Detailed look at Sentinel integration and error handling
Conclusion & Call to Action
A well-designed log pipeline is crucial for modern security operations. Our architecture not only bridges the gap between AWS S3 and Microsoft Sentinel but also ensures reliability, security, and efficiency in log processing.
Have you faced similar challenges with log integration? Share your experiences in the comments below. Let's learn from each other and strengthen our security architectures together.
Next up: Episode 3 - Deep Dive into the Python Connector (Part 1), where we'll explore the technical implementation details of our AWS S3 integration.




