Closed Strunevskiy closed 2 weeks ago
i think there's a way to force an authentication mechanism, is there any way to make a testcase? Ideally either via moto or a cloudformation script to bring up an env to test with. THanks!
i think there's a way to force an authentication mechanism, is there any way to make a testcase? Ideally either via moto or a cloudformation script to bring up an env to test with. THanks!
Where do you have this mechanism to force an authentication? My credentials sits in IMDSv1 when I try to access S3 a request fails.
I will try to create cloudformation for this test case.
Describe the bug When I try to get any access to AWS service on EC2 with only IMDSv1, aiobotocore fails to get credentials. botocore usually fails back to IMDSv1 when IMDSv2 is not available, but aiobotocore throws the error.
Checklist
pip check
passes without errorspip freeze
resultspip freeze results
Environment:
Additional context I believe it happens because botocore and aiobotocore use different underlying HTTP clients which behave differently when getting 405
It looks like it is failing here instead of returning None. https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/utils.py#L118
As a result, it is failing here https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/utils.py#L210