# Cloud Providers You can authenticate with Claude using any of these three methods: 1. Direct Anthropic API (default) 2. Amazon Bedrock with OIDC authentication 3. Google Vertex AI with OIDC authentication For detailed setup instructions for AWS Bedrock and Google Vertex AI, see the [official documentation](https://docs.anthropic.com/en/docs/claude-code/github-actions#using-with-aws-bedrock-%26-google-vertex-ai). **Note**: - Bedrock and Vertex use OIDC authentication exclusively - AWS Bedrock automatically uses cross-region inference profiles for certain models - For cross-region inference profile models, you need to request and be granted access to the Claude models in all regions that the inference profile uses ## Model Configuration Use provider-specific model names based on your chosen provider: ```yaml # For direct Anthropic API (default) - uses: anthropics/claude-code-action@beta with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # ... other inputs # For Amazon Bedrock with OIDC - uses: anthropics/claude-code-action@beta with: model: "anthropic.claude-3-7-sonnet-20250219-beta:0" # Cross-region inference use_bedrock: "true" # ... other inputs # For Google Vertex AI with OIDC - uses: anthropics/claude-code-action@beta with: model: "claude-3-7-sonnet@20250219" use_vertex: "true" # ... other inputs ``` ## OIDC Authentication for Bedrock and Vertex Both AWS Bedrock and GCP Vertex AI require OIDC authentication. ```yaml # For AWS Bedrock with OIDC - name: Configure AWS Credentials (OIDC) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-west-2 - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: anthropics/claude-code-action@beta with: model: "anthropic.claude-3-7-sonnet-20250219-beta:0" use_bedrock: "true" # ... other inputs permissions: id-token: write # Required for OIDC ``` ```yaml # For GCP Vertex AI with OIDC - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 with: workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: anthropics/claude-code-action@beta with: model: "claude-3-7-sonnet@20250219" use_vertex: "true" # ... other inputs permissions: id-token: write # Required for OIDC ```