I have a service which uses an AWS Access Key to push stuff to S3. I am going to sunset the service and I have the AWS Access Key and Secret. However, I can't find this key in the IAM or security credentials for the account.
Is there a way to enumerate all the access keys for an entire AWS account?
Sign in to the AWS Management Console as a federated user with an IAM role. In the Amazon S3 console, choose a bucket name to view details about a bucket. Choose Permissions, and then choose Access Control List. At the top of the page, under Access for bucket owner, the canonical user ID for the AWS account appears.
To access AWS, you will need to sign up for an AWS account. Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS.
Access Keys are used to sign the requests you send to Amazon S3. Like the Username/Password pair you use to access your AWS Management Console, Access Key Id and Secret Access Key are used for programmatic (API) access to AWS services. You can manage your Access Keys in AWS Management Console.
An IAM user is an entity that represents a person or service. Can be assigned: An access key ID and secret access key for programmatic access to the AWS API, CLI, SDK, and other development tools.
If you don't have access to your account's primary access key, but you do have an access key with sufficient access to IAM, you can enumerate all the users in the account and then list the access keys for each of them. For example:
for user in $(aws iam list-users --output text | awk '{print $NF}'); do aws iam list-access-keys --user $user --output text done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With