Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› How can security teams detect serverless execution?
Cyber Security

How can security teams detect serverless execution?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 18, 2026 Domain: Cyber Security

Security teams detect serverless execution abuse by correlating cloud function invocations, unusual API activity, and code deployments from unexpected identities or locations. Watch for short-lived compute bursts, outbound connections to unfamiliar destinations, and functions created or modified outside change control, then validate the triggering event and the caller’s permissions.

What security teams should look for first

Detection starts with the execution plane, not the application code. In practice, that means correlating function invocations with the identity that triggered them, the API calls made around the same time, and any deployment or configuration changes that landed outside the normal change window. A single signal is rarely enough, because legitimate serverless workloads can be bursty and highly distributed.

The most useful starting point is to establish a baseline for who normally deploys, what regions or accounts they use, and which upstream events typically invoke the function. Once that baseline exists, deviations become visible: new callers, unexpected invocation sources, altered environment variables, or a sudden spike in short-lived compute activity that does not match the release calendar.

Serverless Security Guide covers the execution roles, event injection paths, and logging patterns that help teams distinguish normal function activity from abuse.

Execution patterns that usually expose abuse

Serverless abuse is often visible in the shape of the workload. Functions that appear only briefly, then disappear, may still leave a clear trail in logs, billing, and control-plane telemetry. Watch for functions that make outbound connections to unfamiliar destinations, especially when the destination is unrelated to the expected business flow or appears only after a code or configuration change.

Unexpected API activity is another strong signal. That can include a function reading secrets, listing resources, creating permissions, or calling services it has never used before. The question is not simply whether the function ran, but whether the surrounding actions make sense for that function, that identity, and that event source.

Teams should also treat function creation or modification outside change control as a detection priority. If a new handler appears, an existing one is repointed, or a deployment arrives from an unusual location or principal, the most likely explanation is either operational drift or unauthorized access. In both cases, the control objective is the same: prove who made the change and whether the triggering permissions were valid.

Why the permission trail matters as much as the function trail

Serverless execution is easy to miss if defenders only inspect the code layer. The more reliable view comes from linking function behavior back to the caller, the upstream event, and the permission set that allowed both the deployment and the runtime action. If the caller should not have been able to create, alter, or invoke the function, detection should move from anomaly spotting to compromise assessment.

This is especially important when a function is triggered by another cloud service, because abusive behavior may look like normal automation unless the identity chain is examined end to end. A valid invocation from a compromised or over-privileged identity can still be malicious, so the decision point is whether the access path and resulting behavior match the expected trust boundary.

MITRE ATT&CK Enterprise Matrix is useful for mapping the surrounding behaviors, including credential access, lateral movement, and execution patterns that often accompany cloud compromise.

Risk and Threat Considerations

Serverless environments compress attack time. A malicious function can run briefly, touch multiple services, and leave behind only a narrow log window, which makes poor telemetry or delayed review especially risky. The same elasticity that helps defenders scale can also hide low-and-slow abuse, unauthorized data access, or short-lived infrastructure used for exfiltration.

Failure mechanism: Adversaries abuse trusted execution and event-driven triggers, then use legitimate cloud permissions to blend in with normal function activity while making unauthorized API calls or outbound connections.

Impact: Teams may miss code tampering, secret access, data movement, or privilege misuse until after the function has already completed and the evidence trail has thinned.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1053 — Scheduled Task/JobMaps to runtime execution patterns that defenders compare against normal job-like activity.
Recommendation — Map function bursts and repeat triggers to ATT&CK techniques and hunt for anomalous execution chains.
NIST CSF 2.0DE.CM-01 — Monitoring for Anomalous ActivityDirectly supports watching cloud telemetry for unusual function invocations and API activity.
Recommendation — Correlate invocation, API, and deployment telemetry to detect anomalous serverless activity.
NIST SP 800-53 Rev 5AU-6 — Audit Record Review, Analysis, and ReportingSupports reviewing logs to identify unusual identities, locations, and control-plane actions.
Recommendation — Review audit records for unexpected function changes, calls, and invocation sources.
OWASP Non-Human Identity Top 10NHI-10 — Human Use of NHIApplies when human-led deployment or misuse of machine execution identities drives serverless abuse.
Recommendation — Detect human-driven misuse of function identities and investigate unexpected manual changes.
CIS Controls v8CIS-8 — Audit Log ManagementSupports retaining and analyzing cloud logs needed to reconstruct serverless execution paths.
Recommendation — Centralize and analyze cloud audit logs for function creation, modification, and invocation anomalies.

Practitioner Guidance

What to verify: Confirm that every function modification can be tied to a known identity, approved deployment path, and expected change record. If you cannot explain the trigger, the caller, and the deployment source together, treat the event as suspicious rather than merely unusual.

What to measure: Track invocations that arrive from new principals, new regions, or new event sources, and flag any function that suddenly expands its outbound destinations or starts calling sensitive APIs. Those are often the earliest practical indicators that execution has shifted away from the intended use case.

Practitioner takeaway: Serverless detection works best when you reconstruct the full execution story, trigger, caller, deployment, and outbound behavior, instead of relying on function logs alone.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org