CodexBloom - Programming Q&A Platform

OCI Functions Deployment scenarios with 403 Forbidden scenarios Despite Correct Policies

👀 Views: 1 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-05
oci fn-cli functions iam bash

I'm relatively new to this, so bear with me. I tried several approaches but none seem to work... I'm trying to deploy a function to Oracle Cloud Infrastructure (OCI) using the `fn` CLI, but I keep running into a `403 Forbidden` behavior even though I've set what I believe are the correct IAM policies. Here's the command I'm using: ```bash fn deploy --app my_application --docker-image my_docker_image ``` I confirmed that the OCI user has the appropriate permissions, specifically the following policy: ```plaintext Allow group my_group to manage functions in compartment my_compartment ``` Additionally, I've ensured that the function is being deployed in the correct compartment. I also double-checked that the `fn` CLI is configured with the right `config.toml`, which includes the correct tenancy, user, and region. When I run the command, I see this behavior message: ```plaintext behavior: 403 Forbidden: You do not have permission to perform this action. ``` I've tried re-creating the IAM policies multiple times and even ensuring that my user's group is correctly associated. I also verified that the policy is not in a pending state. I've looked through the OCI documentation and it suggests that the correct permissions should suffice, but I must be missing something. Any advice on how to resolve this scenario would be greatly appreciated! How would you solve this? My development environment is macOS. Any help would be greatly appreciated!