From Traditional ML Monitoring to Security-Driven Observability Across AWS, Azure, and Google Cloud
Model drift tells us when a model starts behaving differently. Security-aware observability helps us understand whether the entire ML system can still be trusted.
It is well known that observability in the field of machine learning typically focuses on metrics directly related to the model: prediction accuracy, data drift, concept drift, inference latency, throughput, and resource usage.
However, for modern industrial ML platforms, these metrics are no longer sufficient.
A model may demonstrate high prediction accuracy, but its runtime environment may be compromised, potentially leading to unauthorized access to confidential datasets, the tampering of model artifacts, or even the misuse of credentials used in workflows.
This creates a fundamental architectural divide between traditional monitoring of ML systems and security in cloud environments.
Modern machine learning systems require transparency at all stages of their lifecycle, including: data collection and preprocessing; feature engineering and the use of feature stores; model training and experimentation; model registries and artifact management; CI/CD processes and the ML component supply chain; model deployment and prediction; runtime infrastructure and identity management.
This article presents an architecture for MLOps systems that takes security requirements into account (Security-Aware MLOps Observability). It combines model monitoring, data security, artifact integrity control, infrastructure telemetry, identity context, and event correlation.
Native AWS services serve as the foundation for its implementation, while maintaining the ability to interact with Microsoft Azure and Google Cloud Platform.
In addition to architectural concepts, this article demonstrates practical engineering approaches using tools and technologies such as Python, Boto3, Pydantic, OpenTelemetry, Amazon EventBridge, Amazon SQS, AWS KMS, Prometheus, and AWS Security Hub.
The goal is to move beyond disparate monitoring dashboards and create a security-conscious MLOps management system. This is because such a system allows you to link model behavior to the context—including identity data, infrastructure, dataset information, and the supply chain—within which the models operate.
Imagine an enterprise-grade fraud detection platform that processes millions of transactions daily, where MLOps teams monitor metrics such as: forecast latency; feature distributions; model accuracy; data drift; concept drift; forecast confidence; and error rates in inference.
If an attacker gains access to an execution role associated with the platform used to generate predictions, compromising this account allows the attacker to access the feature store beyond authorized limits and export sensitive customer data.
The infrastructure has been compromised, although from the perspective of traditional machine learning monitoring, nothing unusual is happening because: Prediction accuracy remains stable; Model latency remains unchanged; Feature distributions remain within expected limits; No model drift is detected.
This example illustrates a fundamental limitation— Model observability does not guarantee observability from a security perspective. Therefore, a modern industrial ML platform must provide answers to two independent questions:
- Is the model functioning correctly?
- Is the entire system functioning safely? These two questions require the use of different telemetry data, detection mechanisms, and operational response measures. Consequently, a mature MLOps architecture must integrate both of these aspects without creating unnecessary dependencies in the prediction execution loop. Data security monitoring focuses on how sensitive information moves through the machine learning lifecycle, and key indicators of such monitoring include: Unexpected access to training datasets; Unauthorized access to feature storage; Abnormal dataset uploads; Disclosure of personal data in application logs; Data provenance violations; Unexpected changes to dataset permissions; Access to datasets outside the approved workload boundaries. For example, suppose a training pipeline typically reads 10 GB from two approved datasets but suddenly accesses 500 GB from several unrelated storage locations. In other words, even if training completes successfully, such behavior should trigger a security investigation. It is also important to note that machine learning models are software artifacts and should therefore be managed in the same way as production software. Based on this, monitoring should include: the origin of the model artifact; container image integrity; dependency vulnerabilities; modifications to the model registry; Unauthorized changes to model versions; modifications to the training pipeline; verification of the artifact’s signature; and deployment approval history. Consequently, a model should not be deployed to production simply because its validation metrics are acceptable; its provenance and integrity must also be verified. It is important to note that the security of the infrastructure and runtime environment covers the infrastructure that runs machine learning workloads. Examples of suspicious activity include: IAM privilege escalation; unusual API activity; unauthorized use of service accounts; suspicious network connections; unexpected container execution; changes to encryption or network policies; and anomalous use of GPUs and infrastructure. This layer bridges observability in MLOps with cloud security and DevSecOps. A modern, practice-oriented architecture should provide for the separation of stages such as: Telemetry collection; Event normalization; Context enrichment; Correlation and detection; Risk assessment; Incident response. Each cloud provider must be responsible for collecting its own operational telemetry and security-related data. A centralized observability layer provides a unified context for workloads and the ability to correlate data across different cloud environments.

It is worth noting that the architectural principle lies in semantic normalization, not in the forced unification of implementations. Platforms such as AWS, Azure, and GCP differ in their service models, event structures, and security semantics.
The goal is to normalize the information needed for data correlation while preserving the original provider-specific details.
AWS serves as the primary technological foundation for implementing this architecture for
machine learning monitoring, and a tool such as Amazon SageMaker provides capabilities for: deploying models and managing their lifecycle; monitoring model quality; monitoring data quality; monitoring feature distribution; maintaining a model registry; and organizing model approval processes.
An AWS tool such as SageMaker Model Monitor supports the monitoring of data and model quality within the relevant workflows, while SageMaker Model Registry provides controlled model version management and approval mechanisms.
Security telemetry:

Additional control measures from AWS include:
AWS Lake Formation—for granular data management; AWS PrivateLink—for private network connectivity; VPC endpoints—for accessing supported services over a private network.
Example: Correlating model and security signals

It is well known that traditional machine learning monitoring tools can classify an endpoint as healthy, while security-focused observability systems can detect potential compromises related to credential changes and unusual data access.
Let’s take a look at how machine learning and cloud security are integrated in Azure.
Relevant services include:

Consider a training pipeline whose managed identity normally accesses a single trusted storage account, and suddenly the following occurs:
- The identity gains access to additional storage resources;
- A new service entity is created;
- The pipeline runs using an unexpected container image;
- Model evaluation metrics remain normal. Therefore, a comprehensive threat detection strategy must correlate events related to credentials, storage access, pipeline execution metadata, and the origin of artifacts. The following example demonstrates how to ensure security observability for Vertex AI from GCP. Relevant services include:

Workload Identity Federation is responsible for integrating workload identity data
Suppose a service account associated with an endpoint in Vertex AI begins accessing additional datasets in BigQuery, and at the same time, a new model version appears in the registry, while unexpected administrative activity is recorded in Cloud Audit Logs—yet the prediction accuracy remains unchanged.
Therefore, the threat detection platform must correlate the service account, the model version, the data set access events, and the deployment events.
As is well known, one of the most common challenges in multi-cloud environments is that different event structures are used for model monitoring and security monitoring.
For example:
SageMaker generates telemetry on model execution and endpoint activity;
CloudTrail logs API activity in AWS;
GuardDuty generates alerts about security events;
Azure and GCP provide their own event data related to identity and infrastructure.
Therefore, instead of tying the event correlation mechanism to formats specific to a particular cloud provider, a canonical event contract should be implemented at the application level.
Let’s consider a canonical event schema
The contract should include:

Where applicable, OpenTelemetry protocols should be used. For security-related events, ECS and OCSF can be considered as additional normalization options. This schema represents an application-level contract and is not a substitute for the standards mentioned.
It is particularly important to note that raw events from the provider must be stored separately in an evidence repository with controlled access.
Python implementation using Pydantic
Dependencies:



This contract provides the following:
- Event correlation that is independent of the cloud platform;
- Uniform identification of workloads and models;
- Correlation of traces between output requests and security events;
- Explicit preservation of source event identifiers;
- Scalability without loss of provider-specific metadata. It is essential to note that for production use, schema versioning, validation policies, event timestamps, and data classification must be added, and sensitive attributes must be masked before serialization. As noted above, traditional application monitoring covers metrics such as request processing latency, exceptions, and throughput. For MLOps, taking security requirements into account, additional execution context is required, including: Which model version processed the request? Which deployment variant generated the prediction? Which runtime entity performed the inference? Can the trace be correlated with an ongoing security investigation? OpenTelemetry provides a vendor-neutral instrumentation layer. How instrumentation works in Python Install dependencies:



In other words, output tracing serves as a correlation point between application performance, model behavior, deployment version, and infrastructure telemetry.
In a modern production environment, the OpenTelemetry collector should act as a telemetry gateway and include features such as: attribute filtering; personal data removal; sampling; Batch processing; Retry handling; Export routing; Resource enrichment.
To ensure security, never attach raw prediction input data, client identifiers, credentials, or sensitive feature values to traces. Keep in mind that even feature names can reveal confidential business information. For production systems, telemetry export should be asynchronous and should not create a synchronous dependency on a centralized SIEM system or correlation engine.
Let’s examine how security telemetry works in AWS, where CloudTrail and event processing serve as the foundation for auditing to ensure security observability. However, in practice, simply collecting CloudTrail events is not enough, because the platform must understand which specific workload initiated the event and whether that operation is expected for that workload.
In a modern industrial event processing system, it is necessary to distinguish between the following entities: Source event from a provider; Normalized security event; Enriched context related to an ML workload; Detection result.
An example of a normalization function for CloudTrail events received via EventBridge:



As shown in this example, the original event ID is retained; however, it is not assumed that every API event is automatically associated with a machine learning workload, and the mapping of workload IDs must be performed separately.
It is worth noting that in a production architecture, relevant CloudTrail events can be routed through Amazon EventBridge.
Example of a rule for tracking changes in SageMaker:

This rule can route events to Amazon SQS, AWS Lambda, and an event processing service.
For production environments, you should use reliable queues, dead-letter queues, idempotent consumers, retry policies, and event replay mechanisms.
And to track access events to S3 objects, you need to configure CloudTrail to capture data events, because management events alone are not sufficient to provide a complete picture of object access.
One important method of security threat detection is identifying access by a machine learning workload to datasets outside its approved scope. Here, a basic implementation can compare observed activity with the workload’s approved policy.
Example of policy-based detection:


Example:

Lists of authorized objects make it possible to identify clear policy violations, while
behavioral benchmarks help detect deviations from expected activity.
In my view, a more sophisticated approach involves a combination of the following elements:
Approved access policies for datasets; Historical access patterns; Mapping workloads to their identifiers; Classification of datasets; Task execution metadata; Access frequency; Analysis within time intervals; Data set traceability.
For example, a workload may have access rights to ten data sets, but typically uses only two of them while executing a specific training task.
Access policies and behavioral benchmarks provide complementary threat detection mechanisms.
It is particularly important in a production environment that detection systems also take into account ARN semantics in S3, bucket-level operations, object-level resources, and role session identifiers.
One of the most critical elements of security control in MLOps processes is ensuring that the artifact being deployed is precisely the one that has passed the approval process. This is because model evaluation metrics alone cannot guarantee the integrity of the artifact.
Consider the following scenario:
- The model is successfully trained.
- The evaluation metrics meet all established quality criteria.
- The model is registered in the registry.
- The artifact is unexpectedly replaced by another one.
- The deployment pipeline loads the modified artifact. Consequently, without an integrity check during the deployment process, an artifact different from the one that passed verification may be used. Example: Calculating an artifact digest

Example: Signing an artifact digest using an AWS KMS asymmetric key with an approved signing policy.

Signature Verification Before Deployment

Deployment integrity gate:

A valid signature confirms that a specific digest was signed with the corresponding key, but it does not, on its own, prove that the model was trained using an approved dataset or pipeline.
A manifest of origin in a production environment must include the following components: the SHA-256 hash of the model artifact; the training job ID; the version and digest of the dataset; a source code commit; the digest of the container image; the digest of the dependency lock file; the digest of the evaluation report; the model registry version; the signature key ID; the approval ID; Build timestamp.
The manifest itself must be authenticated and protected against unauthorized modification. To enhance the reliability of the supply chain, integrate SLSA-style provenance tracking, artifact attestation, SBOM generation, and automated scanning of dependencies and containers.
Individual security alerts often lack sufficient context. For example: Unusual access to S3 may be entirely legitimate; a change to an IAM policy may be part of an authorized deployment process; the appearance of an unexpected model version may be the result of a scheduled release; and an increase in the volume of requests to a model may be caused by a business event.
However, a combination of such events may indicate a security incident.
Example of a risk assessment model:

The score is not a standardized security metric or a probability of compromise.
Example Implementation in Python


Example:

The previous implementation demonstrates only a basic evaluation, but production systems require temporal and entity-based correlation. In my experience, events should be grouped by: workload_id; identity_id; model_id; dataset_id; deployment identifier; and event-time window.
Although a 15-minute interval may serve as an initial hypothesis, it must be calibrated based on the actual behavior of the workload. This is because the correlation mechanism must support: event deduplication; latency and out-of-order events; event replay; credibility weighting; asset criticality; Detection suppression; Incident state management.
Potential components for this in AWS include:

Consequently, the correlation state must be persistent and should not be stored exclusively in the process’s RAM; furthermore, risk weighting factors must be calibrated based on historical incidents, false positive rates, and asset criticality.
It is particularly worth noting that the integration of security analysis results (ML-based) with AWS Security Hub should not function as an isolated monitoring component. Therefore, security analysis results must be incorporated into the organization’s established incident management process. For AWS-oriented architectures, the AWS Security Hub service provides standardized integration of such data. Based on this, a unified analysis result should contain: the affected workload; the model version; the workload ID; the dataset used; the source CloudTrail event IDs; the correlation score; and links to supporting data (evidence).
Example of an analysis result structure:



As can be seen, this demonstrates the structure of a detection payload, not a complete implementation of the submission process. Therefore, integration into the production environment must: 1. Use actual account and product identifiers; 2. Validate detections against the supported AWS security detection format; 3. Send results using a supported Security Hub API; 4. Use persistent detection identifiers; 5. Update existing results rather than create duplicates; 6. Preserve links to evidence.
Implementing an MLOps observability system with security in mind should be viewed as a phased evolution of the architecture, rather than a one-time infrastructure deployment. A practical approach involves gradually adding functionality, ensuring that each phase of implementation delivers measurable operational benefits. For example:
- Creation of a monitoring system for machine learning with the following capabilities: Data quality monitoring; Feature distribution monitoring; Model drift detection; Prediction performance monitoring; Monitoring of latency and throughput during inference; Centralized application logging; Model version tracking; Identification of workloads associated with training and inference. For environments such as those running on AWS, suitable tools include Amazon SageMaker Model Monitor, Amazon CloudWatch, and SageMaker Model Registry. This will enable organizations to establish a robust operational foundation for understanding model behavior, workload performance, and changes in the model lifecycle.
- Implementing security telemetry will expand the observability system, enabling you to understand which entities, services, and infrastructure components interact with machine learning workloads and their associated resources. This is achieved using the following tools, depending on the cloud provider you use: AWS CloudTrail; Amazon GuardDuty; AWS Security Hub; S3 data access events; IAM actions and access policy changes; Azure Activity Logs; Microsoft Defender for Cloud; GCP Cloud Audit Logs. This will enable the platform to identify security-relevant activities in the context of machine learning workloads, cloud accounts, and data resources.
- Implementation of a centralized event processing architecture with the following capabilities: the OpenTelemetry toolkit; a versioned canonical event schema; workload identifier mapping; tracking of relationships between models and datasets; event normalization tailored to specific service providers; Correlation of distributed traces; centralized event processing; and preservation of correlation state. Amazon EventBridge and Amazon SQS can serve as the foundation for event routing and reliable delivery. AWS Lambda enables the implementation of lightweight data normalization and enrichment functions, while Amazon DynamoDB supports the maintenance of correlation state. For workloads requiring more complex stateful stream processing, Amazon Managed Service for Apache Flink can be used. It is important to note that the normalization process must not result in the loss of provider-specific information. The canonical schema is designed to simplify data correlation in a multi-cloud environment while preserving the original event from the provider and its associated supporting data. This will enable the organization to transition from disparate monitoring systems to a unified observability architecture capable of correlating events related to models, data, identifiers, and infrastructure.
- Implementation of risk-based detection mechanisms, where, in the initial phase, detection scenarios should include: Unauthorized access to datasets; Unexpectedly large volumes of data extraction; Unauthorized changes to model artifacts; Unexpected changes to IAM policies or workload identifiers; Suspicious traffic associated with model execution; Unauthorized changes to the model registry; Unexpected changes to container images; Leakage of confidential information; Abnormal interactions between machine learning workloads and cloud resources. Detection logic should be based on a combination of various data sources. For example, the mere fact of unexpected access to an S3 resource is not necessarily classified as a security incident. However, if the same workload simultaneously exhibits an unexpected change in IAM policy, unusual data access patterns, and the presence of an unapproved model artifact, the combination of these indicators significantly raises the priority of the investigation. Ultimately, this will enable the platform to detect suspicious behavior based on correlations between events, rather than relying solely on individual, isolated security alerts.
- Automating incident response. For example, for organizations that use AWS as their primary platform, AWS Security Hub can serve as an integration point for security threat analysis results. Additional integrations may include: Amazon EventBridge; AWS Systems Manager Incident Manager capabilities, if available within the organization’s supported configuration; AWS Lambda; Existing SIEM platforms; ticket management and incident management systems; security orchestration and automated response workflows. As a result, security threat detection systems are integrated into operational response processes, enabling controlled and auditable incident handling. For organizations building industrial machine learning platforms, I recommend an implementation strategy that prioritizes, for example, AWS in combination with cloud-provider-agnostic observability mechanisms. In my view, this approach allows engineering teams to leverage AWS’s built-in security features and MLOps tools without creating excessive dependence on a single cloud provider. These components will serve as the foundation for implementing such a system:

It’s worth using Amazon Managed Service for Apache Flink—for cases where stateful stream processing is required. Grafana can provide centralized visualization where appropriate, and integration with Amazon Managed Grafana is also possible.
In my view, an important design principle is that native AWS services should retain responsibility for their respective areas of security and operations. A centralized observability layer should utilize the output from these services rather than attempting to replace the cloud’s built-in security capabilities.
This can be integrated with Azure and Google Cloud using specialized telemetry adapters developed for the respective cloud providers.
For Microsoft Azure: Azure Machine Learning; Azure Monitor; Application Insights; Microsoft Defender for Cloud; Microsoft Sentinel; Microsoft Entra ID; Azure Key Vault; Microsoft Purview.
For Google Cloud: Vertex AI; Cloud Monitoring; Cloud Logging; Cloud Audit Logs; Security Command Center; Cloud KMS; Secret Manager; Sensitive Data Protection; Workload Identity Federation.
It is important to note that each integration must map vendor-specific events to a canonical event contract, which enables the correlation mechanism to work with consistent attributes for workloads, identifiers, models, datasets, and infrastructure.
In my view, a centralized observability layer should provide the following capabilities: Standardized telemetry contracts; A common context for workloads and identifiers; Model and dataset provenance; Cross-cloud event correlation; Risk-based detection; Evidence retention; Generation of security analysis results; Integration with an incident management system.
Before deploying this architecture in a production environment, a number of engineering considerations must be taken into account.
To ensure reliability and event delivery, the following should be provided: guaranteed event delivery; queues for unprocessed messages; idempotence of event consumers; Retry policies; Event replay capability; Duplicate detection mechanisms; Processing of events arriving out of chronological order; Preservation of correlation state.
Services such as Amazon EventBridge and Amazon SQS provide useful tools for building this type of architecture.
To manage telemetry costs and volume, the architecture must be resilient and include: Critical security events; Operational metrics; Distributed traces; Detailed audit logs; Raw data requiring long-term storage.
It is essential to ensure that the monitoring platform does not become a synchronous dependency in the output pipeline. If the correlation mechanism becomes unavailable, the model output must continue to operate in accordance with established workload availability and security policies. Therefore, telemetry collection must be implemented using asynchronous export, buffering, retries, and controlled performance throttling.
This is particularly important for high-performance machine learning platforms, where even a small increase in inference latency can impact business operations.
In conclusion, enhanced model monitoring must include the ability to understand and continuously assess the security posture of the entire machine learning system. This necessarily encompasses several aspects of the machine learning lifecycle: model behavior and performance; data access and provenance; workload identification and authorization; model artifact integrity and provenance; Infrastructure and runtime security; CI/CD and machine learning supply chain security; and the correlation of security events across multi-cloud environments.
References and Further Reading
- AWS: AWS CloudTrail
- AWS: Amazon GuardDuty
- AWS: AWS Security Hub
- Microsoft: Azure Machine Learning Documentation
- Microsoft: Microsoft Defender for Cloud
- Microsoft: Microsoft Sentinel
- Google Cloud: Vertex AI Documentation
- Google Cloud: Security Command Center
- OpenTelemetry: Official Documentation
- Open Cybersecurity Schema Framework: OCSF
- MLflow: Official Documentation
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article