This image shows IoT devices (remotely located cameras in this case) streaming data through an API gateway to an autonomous database.

All the resources are deployed in a single Oracle Cloud Infrastructure region and in a single VCN (

The API gateway routes the streamed data to two functions in a public subnet ( The functions access the Streaming service through a service gateway. One of the functions creates a stream. The other function directs the stream to the autonomous database, which is attached to a private subnet ( An NSG controls access to the database.

A separate function (also in the private subnet) is used to set up the database.

Users outside the cloud can access the streamed data through a web server that's attached to a public subnet. Communication between the public internet and the web server is enabled through an internet gateway. Separate NSGs are available for SSH and web access. The web server can communicate with the database and with the function that streams data to the database.