Migrating an Enterprise Security Operations Platform to AWS Through Microservices Separation and Shared Capability Reuse
System Design
The platform uses a domain-oriented microservices architecture. Security capabilities are separated into alert ingestion, alert normalization, threat enrichment, alert correlation, case management, asset management, vulnerability management, remediation workflow, domain monitoring, firewall response, reporting, notification, identity management, and AI risk analysis services.
Amazon Elastic Container Service with AWS Fargate runs the Spring Boot 3.2.6 microservices. Each microservice has an independent container image, task definition, IAM role, scaling policy, health check, deployment pipeline, and operational service-level objective.
Amazon Elastic Container Registry stores immutable container images. Images are scanned for operating-system and application-package vulnerabilities before deployment. The same image digest is promoted across development, testing, staging, and production environments.
The Vue 3 application is compiled into static assets and hosted in Amazon S3. Amazon CloudFront distributes the user interface, while AWS WAF protects public endpoints from common web attacks, malicious requests, and excessive traffic.
Amazon API Gateway provides stable APIs for security analysts, enterprise systems, firewall devices, and external integrations. Application Load Balancer routes internal application traffic to the appropriate ECS microservices.
ECS Service Connect provides service discovery and controlled communication between internal microservices. Each service uses a stable logical service name instead of depending on fixed IP addresses.
Amazon Managed Streaming for Apache Kafka provides the event backbone. It carries raw alerts, normalized alerts, enrichment results, risk changes, remediation events, firewall commands, and response results between microservices.
Kafka topics are organized by business domain rather than by database table. Representative topics include raw-security-alerts, normalized-alerts, asset-risk-changes, vulnerability-findings, remediation-requests, firewall-block-requests, firewall-block-results, and security-audit-events.
Amazon ElastiCache for Redis provides the low-latency data delivery layer. Frequently requested monitoring views, risk summaries, asset status, alert statistics, and blacklist data are served from Redis.
ElastiCache runs across multiple Availability Zones with automatic failover. Application services use short connection timeouts, bounded retries, circuit breakers, and controlled database fallback to prevent a Redis interruption from overloading the database.
Amazon Timestream for InfluxDB stores high-volume time-series information such as device alerts, security measurements, monitoring metrics, rule execution results, and event-processing latency.
Amazon Aurora PostgreSQL stores relational operational information, including assets, vulnerabilities, incidents, remediation cases, user permissions, workflow state, configuration metadata, and response history.
Amazon S3 stores immutable raw alerts, historical security events, exported reports, threat-intelligence snapshots, model inputs, AI outputs, and audit evidence. Lifecycle policies move older information to lower-cost storage classes according to retention requirements.
AWS Glue Data Catalog and Amazon Athena allow analysts to search historical information in Amazon S3 without placing large analytical workloads on Aurora PostgreSQL.
Amazon Bedrock provides foundation-model access for attack-path analysis, incident summarization, and remediation recommendation generation. Amazon SageMaker AI can host organization-specific classification, prioritization, or risk-scoring models.
AI processing is separated from the critical alert-ingestion path. If an AI service is unavailable, rules-based detection, risk calculation, incident creation, and firewall response continue operating.
AWS Identity and Access Management provides workload identities. Each ECS task receives only the permissions required by its own business function.
AWS Secrets Manager stores database credentials, Kafka authentication information, firewall integration credentials, and external API tokens. Applications retrieve secrets at runtime instead of storing them in configuration files or container images.
AWS Key Management Service provides encryption keys for Amazon S3, Aurora PostgreSQL, ElastiCache, Amazon MSK, logs, backups, and other protected resources.
Amazon CloudWatch collects service logs, metrics, alarms, and dashboards. AWS X-Ray or OpenTelemetry tracing follows a security event across ingestion, normalization, enrichment, risk calculation, case creation, and automated response.
AWS CloudTrail records administrative and API activity. Amazon GuardDuty, AWS Security Hub, Amazon Inspector, and AWS Config provide threat detection, security posture visibility, vulnerability detection, and configuration compliance monitoring.
The production environment spans multiple Availability Zones. Critical ECS services maintain enough healthy tasks to continue operating after the loss of one Availability Zone.
AWS Direct Connect or AWS Site-to-Site VPN securely connects on-premises firewalls, security appliances, databases, identity systems, and management networks to AWS during migration and ongoing hybrid operation.
Independent microservice deployment is supported through separate pipelines. A change to the firewall integration service does not require the asset, vulnerability, alert-processing, or reporting services to be rebuilt or redeployed.
Shared capabilities are packaged as small, versioned libraries. Appropriate shared functions include standardized logging, tracing, authentication validation, audit-event creation, error handling, Kafka serialization, HTTP-client configuration, and resilience controls.
Business rules are not placed in generic shared libraries. Alert suppression, vulnerability prioritization, asset criticality, firewall policy, remediation status, and risk calculations remain within their owning business services.
Shared Java libraries are published as immutable artifacts in AWS CodeArtifact. Services pin approved semantic versions so that a shared-library release does not automatically change every running microservice.
Each microservice owns its data schema. One service cannot directly update another service's private tables. Cross-domain information is exchanged through APIs, Kafka events, or dedicated read models.
The architecture uses a three-tier delivery strategy. Real-time events update urgent operational state, Redis serves low-latency read models, and scheduled jobs perform reconciliation and controlled cache refresh.
The system targets less than 50 milliseconds for designated cached monitoring APIs. The target is measured with percentile-based service-level objectives rather than average response time.
Redis-only endpoints are designed to support more than 500 queries per second, subject to validated key distribution, payload size, connection capacity, and cluster configuration.
The existing five-minute scheduled cycle is retained for reconciliation, reporting, and recovery. It is not used as the primary mechanism for urgent attack detection or automated protection.
Availability is protected through Multi-AZ managed services, automatic task replacement, deployment rollback, database backup, point-in-time recovery, bounded retries, idempotent processing, dead-letter handling, and controlled degradation.
Data Flow
Ingestion Layer
- Services: Security devices, Alert-ingestion service, Amazon S3, Amazon MSK, Alert-normalization service, Deduplication service, Amazon ElastiCache, Enrichment service
- A firewall, scanner, or monitor sends a raw alert over a secured API, Kafka, syslog, Direct Connect, or Site-to-Site VPN.
- The ingestion service checks payload format, source identity, required fields, timestamp, size, and integrity.
- It assigns an event identifier and trace identifier, then stores the encrypted original payload in Amazon S3.
- A raw-alert event is published to Amazon MSK only after that durable record exists.
- The normalization service converts vendor fields into the enterprise schema and keeps the S3 object reference.
- The deduplication service fingerprints the source, signature, asset, indicator, and time window.
- A duplicate updates the existing count and timeline. A unique alert continues through analysis.
- The enrichment service reads ownership, exposure, vulnerabilities, and history from ElastiCache, and backfills a miss from the owning source.
Risk and Read-Model Layer
- Services: Vulnerability service, Correlation service, Rules engine, Risk service, Amazon Aurora PostgreSQL, Amazon MSK, Amazon ElastiCache, Spring Boot API
- The vulnerability service checks whether the asset matches the observed exploit, port, application, or technique.
- The correlation service groups related alerts into an incident and keeps each original alert.
- The rules engine scores confidence, severity, criticality, exploitability, exposure, and business impact.
- The risk service writes reason codes to Aurora and publishes a risk-change event to Amazon MSK.
- Stream consumers update ElastiCache views for dashboards, incident queues, vulnerability lists, and blacklist APIs.
- A cache hit returns the prepared view on the sub-50-millisecond API path.
- A cache miss lets one worker rebuild the value while other requests receive a bounded-stale result.
- If Redis is unavailable, approved APIs use a circuit breaker to read Aurora or return a recent snapshot.
Response Layer
- Services: AI analysis service, Amazon Bedrock, Response-orchestration service, Firewall integration service, Amazon MSK, Target firewall, Incident service, Notification service
- The AI service sends a governed context package to Amazon Bedrock and stores the explanation with model and prompt versions.
- Deterministic policy decides automation eligibility. Bedrock output cannot enforce a firewall action by itself.
- The orchestration service creates a command with an idempotency key, scope, evidence, approval state, and expiration.
- A command that requires a person stays pending until an authorized analyst approves that exact action.
- The firewall integration service checks allowlists, protected assets, duplicates, current policy, and expiration.
- The service translates the command into the vendor API format and applies the control on the target firewall.
- Device state is read back, and an applied or failed event is published to Amazon MSK.
- The incident and notification services update their own records and show analysts the action, evidence, and expiry.
Reconciliation Layer
- Services: Reconciliation job, Amazon MSK, Amazon Aurora PostgreSQL, Amazon ElastiCache, Amazon S3, Firewall integration service, Recovery workflow, Amazon CloudWatch
- Every five minutes, the reconciliation job compares source counts, processing results, Aurora state, cache state, and firewall outcomes.
- Missing or inconsistent records are placed in the recovery workflow.
- The platform replays the affected event or time partition from Amazon S3 and Amazon MSK.
- Corrected results are written to Aurora and ElastiCache without rebuilding the whole environment.
- Firewall outcomes are compared with the command record before the generation is accepted.
- A failed check leaves the previous consistent generation visible.
- CloudWatch records ingestion delay, consumer lag, cache hit ratio, database fallback rate, and firewall-response duration.
- Historical alerts, decisions, and audit evidence remain in Amazon S3 for the required retention period.
Security Layer
- Services: AWS IAM, AWS Secrets Manager, AWS KMS, AWS WAF, Amazon CloudFront, AWS CloudTrail, Amazon GuardDuty, AWS Security Hub
- Each ECS task receives an IAM role limited to its own business function.
- Database, Kafka, firewall, and API credentials are read from AWS Secrets Manager at runtime.
- AWS KMS encrypts Amazon S3, Aurora, ElastiCache, Amazon MSK, logs, and backups.
- Analysts reach the Vue 3 application through Amazon CloudFront.
- AWS WAF inspects public web and API requests.
- AWS CloudTrail records administrative and API activity.
- Amazon GuardDuty detects threats in the AWS environment.
- AWS Security Hub aggregates cloud security findings for the operations team.
Main Logic
- Accept an alert only from an authenticated and authorized source.
- Validate required fields before acknowledging the alert.
- Preserve the original payload before performing normalization or enrichment.
- Assign an event ID and trace ID that remain associated with the alert across all processing stages.
- Maintain both source time and ingestion time so that delayed device delivery can be distinguished from platform-processing delay.
- Convert source-specific alerts into a versioned enterprise event schema.
- Keep event-schema changes backward compatible whenever possible.
- Reject or quarantine malformed messages rather than allowing them to stop an event-processing partition.
- Use stable alert fingerprints to prevent repeated device notifications from creating duplicate incidents.
- Treat Kafka processing as at least once and make every consumer idempotent.
- Use the event ID, command ID, or business idempotency key to detect repeated processing.
- Separate commands from events. A command requests an action, while an event records a completed fact.
- Use business-domain events instead of exposing private database tables to other services.
- Maintain local read models for frequently required cross-domain data. This prevents every alert from making synchronous calls to multiple services.
- Perform real-time processing for alert ingestion, normalization, risk change, and urgent response.
- Use scheduled processing for reconciliation, correction, reporting, and controlled cache refresh.
- Calculate risk from explicit inputs such as asset criticality, alert confidence, vulnerability severity, exploitability, exposure, observed activity, and business impact.
- Store the risk result with the policy version, rule version, input references, reason codes, and calculation timestamp.
- Keep AI analysis advisory unless deterministic policy controls independently authorize an automated action.
- Continue rules-based processing if the AI service is unavailable, slow, or throttled.
- Use Redis for high-frequency monitoring reads, prepared dashboard results, asset-risk summaries, and blacklist distribution.
- Add freshness information to every important cache value.
- Apply randomized expiration periods to reduce simultaneous cache expiration.
- Use request coalescing or a short-lived distributed lock so that one cache miss does not create hundreds of identical database queries.
- Permit database fallback only for approved endpoints.
- Use short dependency timeouts and open the fallback circuit breaker when database latency or connection use crosses a safe threshold.
- Return bounded-stale information for noncritical dashboards when fresh database retrieval would threaten system availability.
- Prevent expensive reporting queries from competing with alert-processing transactions.
- Scale API services according to request rate, latency, CPU, and memory.
- Scale Kafka consumers according to partition lag, processing time, and event arrival rate.
- Ensure that Kafka has sufficient partitions to support the required consumer parallelism and recovery rate.
- Use exponential backoff with jitter for transient failures.
- Do not retry validation errors, unauthorized requests, expired commands, or permanently rejected firewall actions.
- Move repeatedly failing events to a quarantined processing path with the original event, failure reason, attempt count, and owning team.
- Require every automated firewall action to contain an idempotency key.
- Check protected-asset lists and approved allowlists before changing firewall policy.
- Use time-limited blocks where permanent blocking has not been explicitly authorized.
- Verify device state after submitting a firewall command. An accepted API request is not treated as proof that the policy was applied.
- Publish the applied, rejected, expired, or failed result as a new event.
- Record the user, service, policy, evidence, software version, and action associated with every consequential decision.
- Keep shared libraries limited to cross-cutting technical capabilities.
- Keep domain rules inside independently owned services.
- Version shared libraries and prevent automatic untested upgrades.
- Deploy each business service independently.
- Use readiness checks to prevent traffic from reaching a service before initialization is complete.
- Use liveness checks to replace an unrecoverable container.
- Use deployment health alarms and automatic rollback when a new service version cannot reach a stable state.
- Promote the same tested container-image digest between environments.
- Run critical ECS services across multiple Availability Zones.
- Encrypt data in transit and at rest.
- Use IAM task roles instead of long-lived credentials.
- Retrieve secrets at runtime from AWS Secrets Manager.
- Back up operational databases and test point-in-time recovery regularly.
- Test Redis failure, Kafka consumer delay, database pressure, ECS task termination, Availability Zone impairment, and firewall timeout through controlled resilience exercises.
- Measure the under-50-millisecond objective by named endpoint and latency percentile. Do not use average latency as the principal success measure.
- Preserve all accepted alerts. Every alert must be processed successfully or placed into a visible recovery state.
Example Case: Detecting and Blocking a Malicious Public IP Address
- An internet-facing firewall detects repeated exploit attempts from public IP address 203.0.113.45 against a critical enterprise web application.
- The firewall sends a high-severity alert containing the source IP address, destination address, destination port, firewall rule, signature, event time, packet count, and device identifier.
- The ingestion service authenticates the firewall certificate and confirms that the device is registered as an approved event source.
- The service validates the payload, assigns event ID EVT-20261124-00018452, creates a trace ID, and stores the original alert in an encrypted Amazon S3 location.
- The ingestion service publishes the alert to the raw-security-alerts topic in Amazon MSK.
- The normalization service converts the vendor fields into the enterprise alert schema and classifies the activity as an attempted exploitation of a public web service.
- The deduplication service calculates a fingerprint from the firewall ID, signature, source IP address, destination asset, port, and five-minute time window.
- The fingerprint does not match an active alert, so the platform creates a new logical security event.
- The asset-enrichment service identifies the destination as a production payment application owned by the digital commerce team.
- The asset record shows critical business importance, internet exposure, sensitive customer-data processing, and a recovery objective requiring rapid containment.
- The vulnerability service finds that the destination application has an unresolved critical vulnerability associated with the observed exploit pattern.
- The threat-intelligence service finds that the source IP address has been associated with recent automated scanning and exploitation activity.
- The correlation service finds 486 similar requests from the same source IP address within two minutes and identifies attempts against two additional public applications.
- The risk service assigns a high confidence score because the activity contains a recognized exploit signature, repeated attempts, confirmed exposure, and a matching vulnerability.
- The platform calculates a critical risk result and records the contributing factors, rule version, source references, and calculation time.
- The risk-change event updates the Redis monitoring view. The incident appears in the analyst queue without waiting for the five-minute scheduled aggregation.
- The AI analysis service receives the incident timeline, asset details, vulnerability information, threat-intelligence result, and approved web-exploitation response procedure.
- The AI service produces an attack-path explanation stating that the attacker is attempting to exploit an exposed application and could gain access to a critical production environment if the vulnerability is successfully exploited.
- The AI service recommends temporarily blocking the source IP address, increasing monitoring for the affected assets, validating whether exploitation succeeded, and beginning emergency vulnerability remediation.
- The deterministic response policy independently verifies that the source is a public IP address, the address is not on an enterprise allowlist, the destination asset is eligible for automated source blocking, and the confidence score exceeds the approved threshold.
- Because the proposed action affects only one confirmed malicious source and uses a one-hour expiration, the policy allows automatic response without waiting for manual approval.
- The response-orchestration service creates command FWCMD-20261124-000392 with the source IP address, target firewall group, one-hour expiration, incident reference, evidence references, and a unique idempotency key.
- The command is published to the firewall-block-requests topic.
- The firewall integration service consumes the command and confirms that the idempotency key has not been processed before.
- The service checks the global allowlist, protected partner ranges, internal network ranges, and exclusion policy. No conflict is found.
- The service converts the abstract request into the target firewall vendor's API format and submits the temporary deny rule.
- The firewall API accepts the request and returns a rule identifier.
- The integration service performs a second device query and confirms that the deny rule is active on the required firewall nodes.
- The service publishes a firewall-action-applied event containing the command ID, device rule ID, application time, expiration time, verification result, and trace ID.
- The case-management service updates the incident to show that automated containment succeeded.
- The notification service informs the security operations team and the application owner that the malicious source has been temporarily blocked.
- The monitoring service observes that requests from 203.0.113.45 stop reaching the protected applications.
- The platform continues searching historical and real-time data for evidence that the attacker successfully exploited the vulnerability before the block was applied.
- A remediation case is created for the application owner, containing the affected asset, vulnerability, observed attack evidence, recommended patch, target completion time, and required validation procedure.
- The AI-generated narrative is presented to the analyst with its supporting evidence. The analyst accepts the recommendation and adds an investigation note.
- During the next five-minute reconciliation cycle, the platform confirms that the incident record, firewall command, firewall device state, Redis view, audit event, and remediation case are consistent.
- If the malicious activity does not reappear and no broader campaign is detected, the firewall rule expires automatically after one hour.
- The firewall integration service verifies removal of the expired rule and publishes a firewall-action-expired event.
- If the malicious activity returns from the same address or related infrastructure, the platform opens or updates the incident according to the correlation window and response policy.
- The complete evidence chain remains available for audit and investigation, including the original alert, normalized event, enrichment result, risk calculation, AI recommendation, policy decision, firewall command, analyst activity, verification result, and remediation outcome.
Top comments (0)