What is the minimum IAM permission set for the S3 backend?
IntermediateProductionState and Backends in Production
Answer
s3:ListBucket on the bucket, s3:GetObject and s3:PutObject on the state key, and with use_lockfile also s3:DeleteObject on the <key>.tflock object. With the legacy lock table add dynamodb:GetItem, PutItem and DeleteItem on it. If the bucket uses a KMS key, grant kms:Decrypt, kms:GenerateDataKey on it too. Scope the policy per prefix so team A cannot read team B's state.
More on State and Backends in Production
Why should Terraform state never be committed to Git?BeginnerHow do you bootstrap the remote backend, given the bucket must exist before Terraform can use it?IntermediateWhat does a hardened S3 state bucket look like?IntermediateHow do you move from DynamoDB locking to S3 native locking in a live fleet?IntermediateState was deleted or corrupted. How do you recover?AdvancedHow do you split a monolithic state and what drives blast-radius decisions?Advanced