Setting the Context for the Fn Project CLI Using the oracle.profile Parameter

Before using Oracle Functions, you have to configure the Fn Project CLI to use the new profile you added to the Oracle Cloud Infrastructure CLI configuration file ~/.oci/config (see Creating a Profile in the Oracle Cloud Infrastructure CLI Configuration File). The profile you added contains the credentials of the user account you'll be using to create and deploy functions.

Note that unless you specify otherwise, the Fn Project CLI will attempt to use a profile in the ~/.oci/config file named default.

If you are using Cloud Shell as your development environment, the Fn Project CLI has already been configured for you to use the profile in the Oracle Cloud Infrastructure CLI configuration file.

The instructions in this topic assume:

To configure the Fn Project CLI to use the profile you've created for use with Oracle Functions:

  1. Log in to your development environment as a functions developer.

  2. In a terminal window, configure the Fn Project CLI context with the name of the profile you've created for use with Oracle Functions by entering:

    fn update context oracle.profile <profile-name>

    For example:

    fn update context oracle.profile john-oci-profile

When you have completed the steps in this topic, go on to Generating an Auth Token to Enable Login to Oracle Cloud Infrastructure Registry.