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

Amazon.S3.AmazonS3Config.UseAccelerateEndpoint summary is not correct anymore #3719

Open
congthanhnguyenOL opened this issue Mar 24, 2025 · 2 comments
Labels
documentation This is a problem with documentation. p2 This is a standard priority issue queued s3

Comments

@congthanhnguyenOL
Copy link

Describe the issue

The <remarks/> of Amazon.S3.AmazonS3Config.UseAccelerateEndpoint states that This option cannot be used at the same time as UseDualstackEndpoint.

However, in the Requirements for using Transfer Acceleration section from the official document of AWS, it is stated that we can use dualstack endpoints in conjunction with the accelerate endpoint.

One of which must be incorrect. In my experiment we can actually use the accelerate endpoint and the dualstack endpoint at the same time.

Links

/// This option cannot be used at the same time as UseDualstackEndpoint.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html#transfer-acceleration-requirements

@congthanhnguyenOL congthanhnguyenOL added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Mar 24, 2025
@ashishdhingra ashishdhingra self-assigned this Mar 24, 2025
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. s3 and removed needs-triage This issue or PR still needs to be triaged. labels Mar 24, 2025
@ashishdhingra
Copy link
Contributor

Per S3 documentation at:

  • Using Amazon S3 dual-stack endpoints, below are some notes:

    • You can use transfer acceleration with dual-stack endpoints. For more information, see [Getting started with Amazon S3 Transfer Acceleration ](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration-getting-started.html).

    • When using the AWS CLI you currently cannot use transfer acceleration with dual-stack endpoints. However, support for the AWS CLI is coming soon. For more information, see [Enabling and using S3 Transfer Acceleration ](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html#transfer-acceleration-requirements).

  • Configuring fast, secure file transfers using Amazon S3 Transfer Acceleration, To access the bucket that is enabled for Transfer Acceleration, you must use the endpoint bucket-name.s3-accelerate.amazonaws.com. Or, use the dual-stack endpoint bucket-name.s3-accelerate.dualstack.amazonaws.com to connect to the enabled bucket over IPv6. You can continue to use the regular endpoints for standard data transfer.

AWS SDK for .NET S3 code is handcrafted. I could not see any validation that limits use of both UseDualstackEndpoint and UseAccelerateEndpoint at the same time. In the generated AmazonS3EndpointResolver.MapEndpointsParameters(), it's using these values from AmazonS3Config if set. Perhaps the documentation issue!

@congthanhnguyenOL Could you please share the sample code for reproduction which demonstrates that you are able to use the accelerate endpoint and the dualstack endpoint at the same time.

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue labels Mar 24, 2025
@congthanhnguyenOL
Copy link
Author

Hi @ashishdhingra

The following code executed successfully.

using Amazon.S3;
using Amazon.S3.Model;

var config = new AmazonS3Config
{
    UseAccelerateEndpoint = true,
    UseDualstackEndpoint = true,
};
var s3 = new AmazonS3Client("CENSORED", "CENSORED", config);
var httpClient = new HttpClient();

var uploadUrl = s3.GetPreSignedURL(new GetPreSignedUrlRequest
{
    BucketName = "CENSORED",
    Key = "someobject.txt",
    Expires = DateTime.UtcNow.AddMinutes(5),
    Protocol = Protocol.HTTPS,
    Verb = HttpVerb.PUT,
});

var uploadResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Put, uploadUrl)
{
    Content = new StringContent("Hello world!")
});

uploadResponse.EnsureSuccessStatusCode();

As can be seen below, the object appears on the console afterward with the expected content, demonstrating that the presigned URL worked.

  1. Object appears on the console

Image

  1. Object has the expected content

Image

Thanks.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Mar 26, 2025
@ashishdhingra ashishdhingra added needs-review queued and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-review labels Mar 31, 2025
@ashishdhingra ashishdhingra removed their assignment Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p2 This is a standard priority issue queued s3
Projects
None yet
Development

No branches or pull requests

2 participants