Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS S3 Resources tagged with wrong region #1507

Open
urkle opened this issue Sep 6, 2024 · 1 comment
Open

AWS S3 Resources tagged with wrong region #1507

urkle opened this issue Sep 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@urkle
Copy link

urkle commented Sep 6, 2024

Describe the bug
AWS S3 Resources are labeled with the wrong region when there are S3 buckets in multiple regions. All buckets end up being in the last region scanned.

To Reproduce
Steps to reproduce the behavior:

  1. Configure an AWS account
  2. have two S3 bucket in different regions. e.g us-east-1 and us-east-2
  3. start komiser

Expected behavior
The buckets are tagged with the correct region (e.g. different regions)

Instead both are tagged with us-east-2

using the AWS CLI I can use the get-bucket-location API to get the correct region.
( https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html )
aws s3api get-bucket-location --bucket my_bucket_name
{
"LocationConstraint": "us-east-2"
}

OR head-bucket (AWS's preferred API to detect this)
( https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html )
aws s3api head-bucket --bucket my_bucket_name
{
"BucketRegion": "us-east-2",
"AccessPointAlias": false
}

I believe the source of this issue is that the list-buckets API lists ALL buckets for the account regardless of the region.

Komiser version
Version: 3.1.20
Go Version: go1.23.0
Commit: 2ecdf84
OS/Arch: darwin/amd64
Built: 1724082162

Desktop (please complete the following information):

  • OS: MacOS X 12.7.6
  • Browser: Firefox
  • Version: 130.0
@urkle urkle added the bug Something isn't working label Sep 6, 2024
Copy link

github-actions bot commented Sep 6, 2024

Hey, thank you for opening your first Issue! 🙂 While a Tailwarden team member takes a look at your issue we would like to invite you to join our official Discord server, where you can interact directly with other contributors and Tailwarden team members. Link here: https://discord.tailwarden.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants