RootCauseunvalidated
With `--profile`, the AWS CLI uses credentials from the profile/role configuration (`credential_source = Environment`) that have the proper permissions. Without `--profile`, the CLI falls back to a different credential source (e.g., environment/static credentials or another default profile) that either lacks S3 permissions or is stale/invalid, leading to `AccessDenied`.
f373fd29-54e4-443f-b07e-3b9d3fa0edb2
With --profile, the AWS CLI uses credentials from the profile/role configuration (credential_source = Environment) that have the proper permissions. Without --profile, the CLI falls back to a different credential source (e.g., environment/static credentials or another default profile) that either lacks S3 permissions or is stale/invalid, leading to AccessDenied.