Skip to content

Option to Disable AWS IMDS Priority #13237

@ljstrnadiii

Description

@ljstrnadiii

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions