Why are x-id parameters added to pre-signed URLs? #2847
-
Hi, I'm finding that an x-id query parameter is added to pre-signed urls created with this library, like the following: https://testbucket.s3.us-west-2.amazonaws.com/sample2.txt? I'm wondering why this is added, I don't see it in the Amazon specs. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @chrisharward-qumulo , The x-id parameter is an SDK specific thing, it helps the SDK build the request to the correct S3 endpoint. Since multiple S3 operations might share the same endpoint, the SDK's request building functionality has to differentiate between the various S3 operations sent to the same endpoint. This is where x-id comes into place where the actual operation is represented in the url. Admittedly, I'm not sure what purpose it serves in the context of presigned URLs. My guess is that because the presigning flow includes the request building flow in it, the generated URL also has this x-id query parameter that has no server side implication. You can use this example of how you might want to modify the presigner via middleware to see if you can safely remove it. Thanks, |
Beta Was this translation helpful? Give feedback.
Hi @chrisharward-qumulo ,
The x-id parameter is an SDK specific thing, it helps the SDK build the request to the correct S3 endpoint. Since multiple S3 operations might share the same endpoint, the SDK's request building functionality has to differentiate between the various S3 operations sent to the same endpoint. This is where x-id comes into place where the actual operation is represented in the url.
Admittedly, I'm not sure what purpose it serves in the context of presigned URLs. My guess is that because the presigning flow includes the request building flow in it, the generated URL also has this x-id query parameter that has no server side implication.
You can use this example of how…