-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Feature description
There are cases where the instance metadata service should not be prioritized over other authentication methods for EC2 instances and may fail with permission issues.
Additional context
Running the command below fails because the instance metadata service take priority over AWS_CONFIG_FILE and AWS_PROFILE and fails because it does not have permission. We can not grant the SA attached to the node permissions to this bucket. We instead use other mechanism that would normally have higher priority.
AWS_CONFIG_FILE=/.aws/config.yaml AWS_PROFILE=default CPL_CURL_VERBOSE=YES ogrinfo/vsis3/bucket/small_aoi.geojson
I have also tried to set CPL_AWS_AUTODETECT_EC2=NO
but that did not work.
Perhaps I am missing something and disabling this authentication order is already possible. Note that when using boto3 I am able to access this data since IMDS is lower in priority that these AWS env vars.