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

[BUG] Enabling EBS Default Encryption in a non default region fails #222

Open
deanillfeld opened this issue May 31, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@deanillfeld
Copy link

Describe the bug

Enabling EBS Default Encryption in a non default region fails due to a V1 STS token being obtained from the global endpoint. (Reference: https://repost.aws/knowledge-center/iam-validate-access-credentials).

Line 80: sts_client: STSClient = session.client("sts", config=BOTO3_CONFIG)

To Reproduce

Steps to reproduce the behavior:

  1. Deploy the ec2_default_ebs_encryption with a non default region enabled in Control Tower (I had the error on ap-southeast-4 specifically)
  2. Review the Lambda logs for errors in sra.process_enable_ebs_encryption_by_default

Expected behavior

EBS Encryption by Default to be enabled in non default regions.

Deployment Environment (please complete the following information)

  • Control Tower with Cloudformation Deployment

Additional context

I was able to temporarily resolve the issue by hard coding a regional sts endpoint. Understand this isnt scaleable and will only be a quick and dirty solution for my environment.
sts_client: STSClient = session.client("sts", config=BOTO3_CONFIG, region_name=STS_REGION_ENDPOINT, endpoint_url=f"https://sts.{STS_REGION_ENDPOINT}.amazonaws.com")

@deanillfeld deanillfeld added the bug Something isn't working label May 31, 2024
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

1 participant