Skip to content

S3 Bucket Lockout Recovery Using IAM Root Sessions

3 minute read
Content level: Intermediate
0

Procedure for AWS administrators to resolve S3 bucket lockouts through temporary root sessions, addressing a common operational challenge using AWS' latest IAM security features.

S3 Bucket Lockout Causes

S3 bucket lockouts occur when bucket policies or permissions block access. Common causes include policies that deny all IAM users (including administrators) and corrupted bucket policies from failed updates. The new IAM root sessions feature (launched November 2024) provides a secure resolution path for these lockouts.

Pre-requisites

  1. Enable IAM Service in AWS Organizations
  • Navigate to AWS Organizations
  • Go to AWS Identity and Access Management
  • Enable the service to allow centralised root access management

Enter image description here

  1. Configure Root Credentials Management
  • Access IAM in the management account
  • Go to Account Settings
  • Enable root credentials management
  • This allows deletion and auditing of root credentials
  • Enables password recovery for member accounts
  1. Set Up Privileged Root Actions
  • Stay in Account Settings of management account
  • Enable Privileged root actions in member accounts
  • This permits root-level actions such as: Deleting misconfigured Amazon SQS policies, Removing problematic Amazon S3 policies.

Enter image description here

  1. Assign Delegated Administrator (optional)
  • Within Account Settings of another account in the organisation
  • Configure Delegated administrator for centralised root access
  • Select a specific member account where you would like to perform the actions
  • This account will have the same centralised root access from the designated account (similar to management account)

Remediate

Now that the pre-requisites are all setup, we can remediate the bad S3 policy in one of the member accounts.

  • Navigate to IAM Root Access Management
  • View the complete organization hierarchy
  • Select specific accounts requiring privileged actions
  • Follow the below steps to delete an S3 bucket policy.

Click on the specific account, and click privileged action

  • Select delete S3 bucket policy
  • Choose the S3 bucket
  • Click Delete policy
  • Take a backup of the policy before typing "confirm" to delete it
  • The S3 bucket should now be accessible to users

Enter image description here

Enter image description here

Conclusion

The introduction of AWS's centralised root access management feature marks an important advancement in handling S3 bucket lockout scenarios, providing a streamlined yet secure recovery process through temporary privileged sessions. This solution eliminates traditional complexities while offering key benefits including centralised control, policy backups, making it an essential addition to AWS's security infrastructure that organizations could incorporate into their standard operating procedures while maintaining focus on preventive measures.