Skip to main content
This tutorial demonstrates how to grant AWS IAM permissions to applications, containers, or jobs deployed through Qovery, using IRSA (IAM Roles for Service Accounts). This approach eliminates credential management by automatically rotating tokens through AWS’s identity service. Everything deploys through Qovery services from the create_service_account repository:
  1. A Terraform service creates the IAM role (and the OIDC identity provider if needed)
  2. A Helm service creates the Kubernetes ServiceAccount annotated with the role ARN
  3. Your application picks up the ServiceAccount through the Service account advanced setting
The Terraform outputs flow into the Helm values automatically, so nothing is hardcoded. If you prefer to create the IAM resources by hand, the manual AWS Console path is kept as an alternative in step 2.

Prerequisites

  • A Qovery cluster running on AWS EKS
  • Basic knowledge of AWS IAM and Kubernetes
  • AWS credentials allowed to manage IAM (for the Terraform service or the Console)

Step 1: Create an Application Requiring S3 Permissions

First, deploy a simple Debian container that will need S3 access:
  • Deploy a Debian container with 1 instance and 128MB memory
  • You can also use existing applications, containers, or jobs

Get Kubernetes Namespace Name

  1. Access your container variables and locate QOVERY_KUBERNETES_NAMESPACE_NAME
  2. This value represents the namespace where the container runs
Get Kubernetes namespace from container variables

Step 2: Create the OIDC Provider and IAM Role


Step 3: Create the Service Account

A Helm chart creates the ServiceAccount annotated for IRSA:
Add a Helm service to the same environment: Repository Details:
  1. Repository name: Qovery Service Account Helper
  2. Kind: HTTPS
  3. URL: https://qovery.github.io/create_service_account/
Chart Configuration:
  • Helm source: Helm repository
  • Chart name: qovery-sa-helper
  • Version: 0.2.0
Create service account
Helm service configuration
Set Helm repository
Values override:
Reference the Terraform output with the qovery.env macro, so the role ARN is never hardcoded:
Override service account name
Override AWS role ARN
Deploy the Helm service and verify it completes successfully:
Service account creation logs

Step 4: Set Application Service Account

Configure Service Account

  1. Access your application Advanced settings
  2. Set Service account (security.service_account_name) to the created service account name
  3. Deploy using the Deploy now button
Set service account on application

Validate Access

Using Qovery CLI:
Check AWS environment variables:
Validate S3 access:

Key Concepts

  • OIDC Integration: Enables Kubernetes service accounts to assume AWS roles
  • Token Rotation: Automatic credential rotation without manual management
  • Namespace Scoping: Restricts role access to specific Kubernetes namespaces
  • Everything as Qovery services: The IAM role and the ServiceAccount are regular services in your environment, so they are versioned, visible in the Console, replicated with Clone/Preview, and cleaned up with the environment

Conclusion

With the Terraform and Helm services in place, granting a role to a new application comes down to setting one advanced setting. The IAM side lives in your environment like any other service, without credential management overhead.

Terraform Services

Deploy Terraform manifests with Qovery

Advanced Settings

Configure service advanced settings

Environment Variables

Manage environment variables and secrets

Helm Services

Deploy applications with Helm