JP Pakalapati
04/08/2026, 5:37 PMErik Osterman (Cloud Posse)
04/08/2026, 5:42 PMJP Pakalapati
04/08/2026, 6:28 PMatmos.yaml
auth:
providers:
company-sso:
kind: aws/iam-identity-center
region: us-east-1
start_url: <https://company.awsapps.com/start>
auto_provision_identities: true
identities:
company:
default: true
kind: aws/permission-set
via.provider: company-sso
principal:
name: role-for-tf-state
account.id: "11111111111"
company-shared/role-for-create-resources:
kind: aws/permission-set
via.provider: company-sso
principal:
name: role-for-create-resource
account.id: "22222222222"
This is my stack config for a s3-bucket
import:
- catalog/infra/s3-bucket
- mixins/env/dev
- mixins/region/us-east-1
components:
terraform:
s3-bucket:
auth:
identity: company-shared/role-for-create-resources
This is the terraform backend auth section in my org _defaults.yaml
terraform:
backend_type: s3
backend:
s3:
bucket: atmos-tf-state
key: terraform.tfstate
region: us-east-1
role_arn: "arn:aws:iam::11111111111:role/role-for-tf-state"
dynamodb_table: atmos-tf-state-lock
encrypt: true
When I run atmos auth login and try atmos auth whoami, I can see that I assumed role-for-tf-state from account 11111111111.
When I run atmos terraform apply -s s3bucket-dev-ue1, I get an error saying
arn:aws:iam::11111111111:role/role-for-tf-state is not allowed to perform s3:CreateBucket actionAndriy Knysh (Cloud Posse)
04/08/2026, 6:46 PMJP Pakalapati
04/08/2026, 7:04 PMAndriy Knysh (Cloud Posse)
04/08/2026, 7:26 PMJP Pakalapati
04/08/2026, 7:27 PMErik Osterman (Cloud Posse)
04/08/2026, 7:37 PMauth:
identity: company-shared/role-for-create-resourcesErik Osterman (Cloud Posse)
04/08/2026, 7:37 PMErik Osterman (Cloud Posse)
04/08/2026, 7:37 PMErik Osterman (Cloud Posse)
04/08/2026, 7:38 PMJP Pakalapati
04/08/2026, 7:46 PMErik Osterman (Cloud Posse)
04/08/2026, 10:30 PMAndriy Knysh (Cloud Posse)
04/09/2026, 1:43 AMterraform:
auth:
identities:Andriy Knysh (Cloud Posse)
04/09/2026, 1:44 AMJP Pakalapati
04/09/2026, 2:07 PMErik Osterman (Cloud Posse)
04/09/2026, 2:10 PMErik Osterman (Cloud Posse)
04/09/2026, 2:11 PM--logs-level=debugErik Osterman (Cloud Posse)
04/09/2026, 2:12 PMErik Osterman (Cloud Posse)
04/09/2026, 2:12 PMJP Pakalapati
04/09/2026, 2:40 PMcomponents:
terraform:
s3-bucket:
auth:
identities:
company-shared/role-for-create-resources:
default: true
Since I also have the role-for-tf-state identity as default, when running the atmos terraform apply it asked me to select between the multiple default identities. I had to select the role-for-tf-state as I need that for storing tf states and I got the error
arn:aws:iam::11111111111:role/role-for-tf-state is not allowed to perform s3:CreateBucket actionJP Pakalapati
04/09/2026, 2:40 PM1.214.0Andriy Knysh (Cloud Posse)
04/09/2026, 2:46 PMErik Osterman (Cloud Posse)
04/09/2026, 3:09 PMvia.provider: company-sso
But can you also try this instead:
via:
provider: company-ssoJP Pakalapati
04/09/2026, 3:35 PMrequired: true for the the identity in stack file like
components:
terraform:
s3-bucket:
auth:
identities:
company-shared/role-for-create-resources:
default: true
required: true
and made sure both the credentials are loaded in the ~/.config/atmos/cdf72cad0f499891/aws/company-sso/credentials file. But stil got the error.
It's just not switching the identity when running terraform apply.JP Pakalapati
04/09/2026, 3:36 PMAndriy Knysh (Cloud Posse)
04/09/2026, 3:37 PMJP Pakalapati
04/09/2026, 3:37 PMJP Pakalapati
04/15/2026, 1:26 PMAndriy Knysh (Cloud Posse)
04/15/2026, 2:03 PMAndriy Knysh (Cloud Posse)
04/15/2026, 2:11 PM--use-version
https://atmos.tools/changelog/pr-artifact-installation