Skip to content

credctl setup aws-oidc

Terminal window
credctl setup aws-oidc [flags]

credctl setup aws-oidc creates a public S3 bucket and uploads OIDC discovery documents, providing an OIDC issuer URL without needing a CloudFront distribution.

This is a simpler and cheaper alternative to credctl setup aws, which deploys a full CloudFormation stack with S3 + CloudFront. The trade-off is no CDN caching or DDoS protection, but for individual use this is sufficient.

The issuer URL format is https://{bucket}.s3.{region}.amazonaws.com.

Only the OIDC paths (.well-known/* and keys.json) are publicly readable — the bucket policy scopes access to these objects only.

FlagTypeDefaultDescription
--bucketstringcredctl-oidc-{account-id}S3 bucket name.
--regionstringus-east-1AWS region.
Terminal window
credctl setup aws-oidc
Creating S3 bucket 'credctl-oidc-123456789012'...
Configuring public access...
Generating OIDC documents...
Uploading OIDC documents to S3...
AWS OIDC setup complete.
Issuer URL: https://credctl-oidc-123456789012.s3.us-east-1.amazonaws.com
Bucket: s3://credctl-oidc-123456789012
Next: create the IAM OIDC provider and role:
credctl setup aws --issuer-url https://credctl-oidc-123456789012.s3.us-east-1.amazonaws.com --policy-arn <arn>
Terminal window
credctl setup aws \
--issuer-url https://credctl-oidc-123456789012.s3.us-east-1.amazonaws.com \
--policy-arn arn:aws:iam::123456789012:policy/MyDevPolicy
Terminal window
credctl setup aws-oidc --bucket my-oidc-bucket --region eu-west-1
CodeMeaning
0S3 bucket created and OIDC documents uploaded
1Error (device not initialised, AWS CLI not found, permission denied, or other error)