OCI Functions: Getting 'Function Not Found' scenarios When Invoking Deployed Function Using Python SDK
I'm working on a project and hit a roadblock. I'm stuck on something that should probably be simple. I'm currently working with an scenario when trying to invoke a deployed OCI Function using the Python SDK. After successfully deploying the function, I'm receiving a 'Function Not Found' behavior when I attempt to invoke it. The function is supposed to return a simple greeting message, but instead, I get the following behavior message: ``` oci.exceptions.ServiceError: (404, 'Not Found', 'Function not found') ``` Iโve double-checked the function name and the namespace, and everything seems to match. Hereโs the code snippet Iโm using to invoke the function: ```python import oci # OCI config config = oci.config.from_file() # Assuming default config file # Function Invocation fn_client = oci.functions.FunctionsInvokeClient(config) function_id = 'ocid1.function.oc1..exampleuniqueID' try: response = fn_client.invoke_function(function_id=function_id) print(response.data) except oci.exceptions.ServiceError as e: print(f'behavior invoking function: {e}') ``` Iโve confirmed that the `function_id` is the correct OCID of my deployed function. I also checked the function's status in the OCI Console, and it shows that the function is active. I've tried adding a slight delay before the invocation to ensure the function is fully deployed, but that didn't help. Additionally, I re-deployed the function multiple times, and I have also ensured that the correct region is being targeted in the SDK config. Has anyone experienced a similar scenario or have any insights on how to resolve this? Any help would be appreciated! Is there a better approach? I'm on macOS using the latest version of Python. Thanks for your help in advance! For context: I'm using Python on CentOS. Any pointers in the right direction? I've been using Python for about a year now. Thanks for your help in advance!