Skip to content

Accessing s3 bucket using tokio-rustls-tls returns 403 error  #291

@ArjunGTX

Description

@ArjunGTX

Describe the bug
When trying to access s3 bucket using the tokio-rustls-tls feature, it is returning 403 (Access denied) as response for head_object() request. The same request succeeded when tokio-native-tls was used.

To Reproduce

  • Include tokio-rustls-tls feature
rust-s3 = { version = "0.32", default-features = false, features = [
  "tokio-native-tls",
  "tags"
] }
  • Create a bucket with appropriate credentials
let bucket = Bucket::new(
		"my_bucket",
		Region::Custom {
			endpoint: "my_endpoint",
			region: "my_region",
		},
		Credentials::new(
			Some("my_key"),
			Some("my_secret"),
			None,
			None,
			None,
		)
		.context("unable to create credentials")?,
	)
	.context("unable to create bucket")?;
  • Invoke the head_object() request
let (head, code) = bucket.head_object(&file).await?;

Expected behavior

  • The expected code was 200 but got 403
  • Same request using tokio-native-tls returned 200 code

Environment

  • Rust version: [e.g. 1.63]
  • lib version [e.g. 0.32]

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions