Study guide
6.1 OCI Functions: Concepts, Invocation Modes, Integrations & Image Security
OCI 2026 Architect Professional 1Z0-997-26
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & Architecture Foundations
1.1 Exam Logistics, the 2026 Blueprint & How to Use This Guide 1.2 The OCI Well-Architected Framework & Architectural Tradeoffs
2 Chapter 2: High Availability & Resilient Design
2.1 Availability Domains, Fault Domains, Instance Pools & Load Balancers 2.2 OCI DNS Traffic Steering, Geolocation & Health Checks 2.3 Block Volume Replication, Volume Groups & Backup Policies 2.4 Object Storage Replication, Versioning & Retention Rules (WORM)
3 Chapter 3: Full Stack Disaster Recovery
3.1 Full Stack Disaster Recovery: Protection Groups, Members & Permissions 3.2 DR Plans: Switchover, Failover, Prechecks & Plan Execution 3.3 DR Drills, Plan Customization & Operational Readiness
4 Chapter 4: Container Instances, OCIR & OCI DevOps
4.1 Containerization, Microservices & OCI Container Instances 4.2 OCI Container Registry: Repositories, Push & Pull, and Image Management 4.3 OCI DevOps: Code Repositories, Build Pipelines & Deployment Strategies
5 Chapter 5: OCI Kubernetes Engine (OKE)
5.1 OKE Cluster Types, Node Options & Cluster Creation 5.2 OKE Networking: VCN-Native Pod Networking vs. Flannel, Subnet Sizing & Load Balancers 5.3 OKE Workload Identity, Secrets & Persistent Storage
6 Chapter 6: Serverless Functions & API Gateway
6.1 OCI Functions: Concepts, Invocation Modes, Integrations & Image Security 6.2 API Gateway: Authentication, JWT Validation, Rate Limiting & Usage Plans
7 Chapter 7: Messaging & Event-Driven Design
7.1 OCI Streaming, OCI Queue & Messaging Patterns for Microservices 7.2 OCI Events, Event Rules & OCI Notifications Fan-Out
8 Chapter 8: Infrastructure as Code with Terraform & Resource Manager
8.1 Infrastructure as Code with Terraform and the OCI Provider 8.2 OCI Resource Manager: Stacks, Jobs, Drift Detection & Private Endpoints
9 Chapter 9: Identity & Multi-Tenancy Governance
9.1 IAM Policy Design: Verbs, Conditions, Dynamic Groups & Principals 9.2 Organizations Management, Governance Rules & Compartment Quotas
10 Chapter 10: Security Posture with Cloud Guard & Security Zones
10.1 Cloud Guard: Detector Recipes, Problems, Scores & Responders 10.2 Security Zones & Vulnerability Scanning
11 Chapter 11: Secure Access & Network Protection
11.1 Layered Network Security: Security Lists, NSGs & Private Access to Services 11.2 OCI Bastion: Managed SSH, Port Forwarding & SOCKS5 Sessions 11.3 Zero Trust Packet Routing (ZPR): Security Attributes & Intent-Based Policy 11.4 OCI Network Firewall: Policies, Inspection Routing, Tunnel Inspection & Private NAT
12 Chapter 12: Application & Data Protection: WAF, Certificates & Vault
12.1 OCI Web Application Firewall: Policies, Modules, Actions & Enforcement Points 12.2 OCI Certificates: Private CAs, TLS Certificates, Renewal & Integrations 12.3 OCI Vault Key Management: Vault Types, Protection Modes, Dedicated KMS & External KMS 12.4 Vault Secrets: Versions, Rotation States, Automatic Generation & Rotation
13 Chapter 13: Base Database Service & Autonomous AI Database
13.1 Base Database Service: DB Systems, RAC, Data Guard, Cloning & Maintenance 13.2 Autonomous AI Database: Workload Types, Deployment Options, Services & Connectivity 13.3 Operating Autonomous AI Database: Scaling, Cloning, Backups, Patching & Self-Tuning 13.4 Autonomous Data Guard & Backup-Based Disaster Recovery for Autonomous AI Database
14 Chapter 14: Recovery Service, Global Distribution & OCI Cache
14.1 Autonomous Recovery Service: Protection Policies, Real-Time Protection & Retention Lock 14.2 Globally Distributed Autonomous AI Database: Sharding, Data Placement & Replication 14.3 OCI Cache: Valkey and Redis Clusters, Sharding, Security & Cross-Region Replication
15 Chapter 15: Monitoring, Alarms & Notifications
15.1 OCI Monitoring: Metrics, Namespaces, Custom Metrics & Monitoring Query Language 15.2 Alarms & Notifications: Trigger Rules, Absence Alarms, Split Messages, Suppression & Delivery
16 Chapter 16: Logging, Audit, Connector Hub & Search
16.1 OCI Logging: Log Groups, Service Logs, Custom Logs & the Unified Monitoring Agent 16.2 Logging Search, the Logging Query Language & OCI Audit 16.3 Connector Hub: Moving Logs, Metrics, Queue Messages & Streams Between Services 16.4 OCI Search with OpenSearch & Resource Search for Observability
6.1 OCI Functions: Concepts, Invocation Modes, Integrations & Image Security
Key Takeaways Explain This Topic AI
OCI Functions is a fully managed, multi-tenant serverless execution platform built on the open-source Fn Project, executing container images hosted in OCI Registry (OCIR).
Function memory can be 128, 256, 512, 1024, 2048, or 3072 MB, and synchronous invocations time out after at most 300 seconds (default 30 seconds).
Detached invocations return HTTP 202 immediately, can run for 5 to 3,600 seconds, and can send results to Notifications, Queue, or Streaming destinations.
Request and response payloads are each limited to 6 MB, and that limit cannot be changed.
An application's signature verification policy can require that functions only use images signed with specified Vault keys.
Last updated: October 2026
- 11.1 OCI Functions: Architecture, Fn Project, Triggers & Container Images
- Serverless Compute Engine & The Fn Project
Oracle Cloud Infrastructure (OCI) Functions provides an enterprise-grade, event-driven serverless platform that enables software engineers and cloud architects to run stateless code without provisioning, managing, or patching underlying server infrastructure. Developers write functions in Java, Python, Node, Go, Ruby, or C#, or bring their own Dockerfile or GraalVM image, while OCI manages high availability, autoscaling, container lifecycle orchestration, and operating system maintenance across Availability Domains and Fault Domains.
At its core, OCI Functions is powered by the open-source Fn Project . Because the Fn Project runtime is open source, container-native, and cloud-agnostic, functions developed on OCI do not suffer from vendor lock-in. Developers can test, debug, and execute their functions locally in a Docker runtime on their workstations and seamlessly deploy identical container images to OCI Functions, an on-premises Kubernetes cluster, or alternative multicloud environments with zero code modifications.
Billing for OCI Functions operates strictly on an execution-based consumption model. Organizations pay only for the resources consumed while code actively runs: measured by the number of invocations and the memory consumed per second (gigabyte-seconds, or GB-s). When idle, the platform scales to zero, incurring zero compute cost.
Container Packaging & OCI Registry (OCIR)
Unlike traditional serverless offerings that package code as zip archives containing source files and runtime interpreters, OCI Functions treats every function as a standardized OCI-compliant Docker container image .
When a developer initializes and builds a function using the fn command-line interface (CLI):
The Fn CLI reads the function definition file ( func.yaml ), which declares runtime parameters, memory limits, timeouts, and execution entry points.
A multi-stage Docker build constructs a container image encapsulating the compiled code, dependencies, and language runtime.
The image is tagged and pushed to OCI Registry (OCIR) (also known as Container Registry) within the tenancy.
When the function is deployed into an OCI Functions Application , OCI stores the container image digest reference in the application metadata.
Application Boundary & Network Placement
An Application in OCI Functions acts as a logical grouping, operational boundary, and network configuration envelope for related functions. When creating an Application, architects configure:
Virtual Cloud Network (VCN) Subnets : The application is attached to one or more subnets. Use regional private subnets, with a service gateway or NAT gateway for outbound access the functions need.
Network Security Groups (NSGs) : Controls ingress and egress traffic rules at the function elastic network interface (VNIC) layer.
Shape Family : Functions can run on standard x86 architectures or energy-efficient Ampere A1 ARM compute shapes.
Logging & Tracing : Direct integration with OCI Logging for stdout/stderr capture and OCI Application Performance Monitoring (APM) for distributed distributed call tracing via OpenTelemetry.
Execution Lifecycle, Cold Starts & Scaling
The execution lifecycle of an OCI Function transitions through distinct phases depending on whether the execution container is newly instantiated or warm: Incoming Request --> Route to AD/FD Pool --> Container Provisioning (Cold Start) --> Handler Execution --> Warm Idle Retention (Warm State) --> Container Termination
1. Cold Start Execution
When a function is invoked after an idle period—or when incoming request spikes require horizontal scaling beyond currently running instances—a cold start occurs:
OCI Functions provisions the execution infrastructure (compute and network resources) and pulls the function image from OCIR.
The container runtime initializes the underlying cgroup/namespace sandbox.
The language runtime bootstraps, loading language virtual machines (e.g., the JVM in Java or Python interpreter), static class declarations, and external dependencies.
The function handler receives the request payload via standard input/HTTP and returns the response.
Cold start duration is heavily influenced by container image size and runtime bootstrap overhead. Runtimes with heavy startup work, such as large Java applications, feel cold starts the most.
2. Warm Execution & Container Reuse
Following successful execution, the container instance does not terminate immediately. OCI Functions keeps the container for a short idle period. If another invocation arrives during that period, it goes to the existing warm container , skipping image download and runtime startup, so it responds much faster than a cold start. Oracle notes that a cold start can take several seconds or longer.
3. Ephemeral Filesystem & State Management
Any local scratch space inside a function container is temporary. It disappears when the container is recycled and is never shared between concurrent invocations, so functions must be stateless and keep data in Object Storage, a database, or OCI Cache.
Sizing Envelope & Constraints
Architects must design within the platform's hard architectural boundaries:
Configuration Dimension Operational Parameter Architectural Implication
Memory Allocation 128 (default), 256, 512, 1024, 2048, or 3072 MB CPU allocation scales with memory; Java functions should use at least 256 MB.
Sync Invocation Timeout Default 30 seconds; maximum 300 seconds Longer work should use detached invocation or another runtime.
Detached Invocation Timeout 5 to 3,600 seconds (uses the sync timeout if not set) Suits long-running and scheduled tasks.
Local Storage Temporary scratch space only Keep state in Object Storage, a database, or OCI Cache.
Payload Limits 6 MB request and 6 MB response (fixed) Pass larger data as an Object Storage reference.
Concurrency Limits Tenancy-wide regional concurrency quota High-volume APIs require requesting service limit increases or using provisioned concurrency.
Invocation Triggers & Enterprise Integration
OCI Functions can be invoked through diverse synchronous and asynchronous mechanisms across the OCI ecosystem:
Direct API & SDK Invocations : Invoked synchronously or asynchronously via OCI CLI ( oci fn function invoke ), OCI SDKs (Java, Python, TypeScript, Go), or direct HTTPS REST endpoints.
OCI API Gateway : Functions serve as serverless backends for REST and HTTP APIs, handling route mapping, request payload transformation, and responses.
OCI Events Service : Real-time infrastructure state changes (e.g., Object Storage upload, compute instance lifecycle transition) trigger asynchronous function execution.
Service Connector Hub (SCH) : Functions act as transformation and enrichment tasks between OCI Logging/Streaming sources and downstream storage targets.
OCI Notifications (ONS) : Functions subscribe to ONS topics, executing automated incident remediation when alarms fire.
Resource Scheduler : Functions added to a resource schedule run on a recurring schedule and are always invoked in detached mode.
Full Stack DR and other services : DR plans, Notifications subscriptions, and Connector Hub tasks can all invoke functions as part of larger workflows.
Synchronous vs. Detached Invocation
OCI Functions supports two invocation types:
Invocation type Behavior Execution limit Results
Sync (default) Returns HTTP 200 with the function's result when it finishes Up to 300 seconds ( timeoutInSeconds , default 30) Returned to the caller
Detached Returns HTTP 202 as soon as processing begins 5 to 3,600 seconds ( detachedModeTimeoutInSeconds ) Optional success and failure destinations in Notifications, Queue, or Streaming
You request detached mode with the fn-invoke-type: detached header, for example oci fn function invoke --fn-invoke-type detached . Writing to destinations requires IAM policies that allow the function application ( request.principal.type = 'fnapp' ) to use the target topic, queue, or stream. When a client calls a function synchronously, the client's own read timeout also matters: the OCI CLI uses 60 seconds by default, so a long synchronous call may need a larger --read-timeout .
Pre-Built Functions
Oracle publishes pre-built functions that you can create from the Console without writing code, such as a document generator and database secret rotation functions used with Vault automatic secret rotation. By default, the Console can create the dynamic group and IAM policy a pre-built function needs.
Image Security
Function images live in OCIR, so supply-chain controls matter:
Signature verification policy : you configure an application with one or more Vault master encryption keys. The application then accepts only function images signed with those keys, so an unsigned or tampered image cannot be deployed.
Scanning : enable an image scanner on the repository so new vulnerabilities are reported.
Cross-tenancy pulls : a function can use an image from another tenancy's repository only when both tenancies have the required endorse and admit policies.
Oracle also supports code-only functions created from an archive of source code, in addition to image-based functions.
Logs, Metrics, and Tracing
Enable the function invocation logs service log on the application to capture stdout and stderr in OCI Logging. OCI Functions emits metrics such as invocation counts, errors, and duration to Monitoring, and it can send traces to Application Performance Monitoring for end-to-end latency analysis. These signals are the first place to look when a function times out or returns errors.
Enterprise Security with Resource Principals
In enterprise architectures, functions regularly interact with downstream OCI services: retrieving encryption keys from OCI Vault, reading records from Autonomous Database, or querying Object Storage. Embedding static IAM user credentials, API signing keys, or passwords inside container images or environment variables introduces grave security risks and violates enterprise zero-trust mandates.
OCI Functions resolves this using Resource Principals . With Resource Principals, the function itself is treated as a trusted IAM principal, authenticating dynamically via cryptographically signed OCI security tokens.
Implementing Resource Principals
Define a Dynamic Group : Create a dynamic group that captures the function instances using declarative matching rules. Matching can scope to all functions in a compartment or a specific function OCID: ALL {resource.type = 'fnfunc', resource.compartment.id = 'ocid1.compartment.oc1..aaaaaaaaxample'}
Grant IAM Permissions : Write IAM policies granting the dynamic group least-privilege permissions over target resources: Allow dynamic-group FnFinanceProcessors to read secret-bundles in compartment FinanceProduction
Allow dynamic-group FnFinanceProcessors to manage objects in compartment InvoiceArchives
SDK Authentication in Code : In the function code, instantiate the OCI SDK client using the Resource Principal authentication provider rather than a configuration file or private key: import oci
- signer = oci.auth.signers.get_resource_principals_signer()
- secrets_client = oci.secrets.SecretsClient(config={}, signer=signer)
The Fn runtime automatically injects short-lived security tokens ( OCI_RESOURCE_PRINCIPAL_RPST ) into the container environment, rotating them transparently without operational intervention.
Architectural Optimization & Cold Start Mitigation
To deliver enterprise SLAs on OCI Functions, architects should apply four proven performance optimization strategies:
Memory Right-Sizing : The CPU available to a function scales with its configured memory, so compute-heavy or JVM-based functions often start and run faster with 1024 MB or more. Billing is per GB-second, so measure whether the shorter run time offsets the larger memory setting.
Multi-Stage Container Image Slimming : Minimize Docker image layers by using multi-stage builds and minimal base images (such as Alpine Linux or distroless images). Smaller images download faster from OCIR when new execution infrastructure is provisioned.
Connection Pooling & Lazy Initialization : Initialize database connection pools, SDK clients, and cryptographic helpers outside the request handler function. Static initialization runs once during container bootstrap and persists across subsequent warm invocations.
Provisioned Concurrency : Enable provisioned concurrency , measured in provisioned concurrency units (PCUs), so OCI Functions always has execution infrastructure ready for a minimum number of concurrent invocations. This minimizes cold-start latency for latency-sensitive APIs. A regional limit, provisioned-concurrency-mb, caps the memory that can be reserved this way.
Serverless & Container Compute Comparison
Dimension OCI Functions OCI Container Instances OKE Virtual Nodes Compute Virtual Machines
Execution Paradigm Event-driven serverless Serverless container execution Managed serverless Kubernetes Full IaaS virtual machine
Infrastructure Management Zero (fully managed) Zero (container-only) Managed control plane & nodes Customer manages OS & patching
Maximum Duration 300 s sync; up to 3,600 s detached Runs until stopped Runs until stopped Runs until stopped
Startup Behavior Cold start can take seconds; warm calls are fast Instance creation before containers start Pod scheduling on serverless capacity Full OS boot
Scaling Granularity Per-request (rapid burst) Manual or automated via API Horizontal Pod Autoscaler (HPA) Instance Pools with autoscaling
Billing Model Invocations + GB-seconds OCPU and memory while Active Pod compute consumed + per-virtual-node charge Instance shape usage
Primary Use Case API backends, event transforms Batch jobs, long-running containers Complex microservices & meshes Legacy enterprise monoliths