credctl setup aws-profile
Synopsis
Section titled “Synopsis”credctl setup aws-profile [flags]Description
Section titled “Description”credctl setup aws-profile adds a credential_process entry to ~/.aws/config so the AWS CLI and SDKs use credctl to obtain temporary credentials automatically.
The command creates or updates the specified profile with the credential_process directive pointing to the credctl binary, and sets the region from your credctl configuration.
Respects the AWS_CONFIG_FILE environment variable for custom config file locations. Preserves existing profiles and their settings.
Requires AWS to be configured first (credctl setup aws).
| Flag | Type | Default | Description |
|---|---|---|---|
--profile | string | credctl | AWS CLI profile name to create. |
--force | bool | false | Overwrite the profile if it already exists. |
Examples
Section titled “Examples”Default profile name
Section titled “Default profile name”credctl setup aws-profileConfigured profile 'credctl' in /Users/you/.aws/config AWS_PROFILE=credctl aws sts get-caller-identityUse it:
AWS_PROFILE=credctl aws s3 lsSet as default profile
Section titled “Set as default profile”credctl setup aws-profile --profile defaultConfigured profile 'default' in /Users/you/.aws/config aws sts get-caller-identityCustom profile name
Section titled “Custom profile name”credctl setup aws-profile --profile myprojectOverwrite existing profile
Section titled “Overwrite existing profile”credctl setup aws-profile --profile credctl --forceWhat it writes
Section titled “What it writes”The command adds a section like this to ~/.aws/config:
[profile credctl]credential_process = /usr/local/bin/credctl authregion = us-east-1Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Profile configured successfully |
| 1 | Error (device not initialised, AWS not configured, profile already exists, or other error) |
See also
Section titled “See also”credctl setup aws— set up AWS OIDC federation infrastructurecredctl auth— the command thatcredential_processinvokes- AWS setup guide — full walkthrough