1Z0-997-25 Question 18
Select 2You have developed a serverless function in Oracle Cloud Infrastructure that processes user data. You want to publicly expose it over HTTPS for external clients using the API Gateway. Additionally, this function needs to securely access an Autonomous Database instance without hard-coding credentials in the function code. Which two steps must you take to meet these requirements? (Choose two)
- A
Create an API Gateway deployment with a route that uses Oracle Functions as the back end and reference the function� OCID in the route configuration.
- B
Enable �Function Concurrency Scaling� in the API Gateway deployment� advanced settings to handle increased load automatically.
- C
Configure a resource principal in the function to grant it permission to access the Autonomous Database without embedding credentials.
- D
Assign the function a public IP address so that external clients can invoke it directly, bypassing the API Gateway if necessary.
Show answer and explanation
Correct answers: A, C
Explanation
When exposing a serverless function through OCI� API Gateway, you must set up a gateway deployment with a route pointing to an Oracle Functions back end (referencing the function OCID). For secure access to resources such as Autonomous Database, you configure a resource principal in the function, ensuring that no credentials are stored within the function code. These configurations follow OCI best practices for deploying serverless functions with efficient, secure API management. For more details, consult the OCI documentation on API Gateway deployments with Oracle Functions and using resource principals.
- A. Correct.
Option 1 is correct. For an API Gateway to invoke a function, you must create a deployment and route configured with an Oracle Functions back end. Here, you reference the function� OCID so the API Gateway can properly invoke your function.
- B. Incorrect.
Option 2 is incorrect. There is no feature called �Function Concurrency Scaling� in the API Gateway settings. Oracle Functions automatically handle scaling, and there is no manual concurrency scaling setting in the API Gateway routing configuration.
- C. Correct.
Option 3 is correct. Using a resource principal allows the function to securely access other OCI services like Autonomous Database without storing credentials in the code. This is a best practice for serverless architectures in OCI.
- D. Incorrect.
Option 4 is incorrect. You don�t assign public IP addresses to functions in Oracle Functions. Invoking the function publicly is done through the API Gateway� public endpoint, not by giving the function itself a public IP.