hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 8.99k forks source link

[Bug]: aws_s3_object_copy fails to copy objects bigger than 5GB #38102

Open marcaurele opened 1 week ago

marcaurele commented 1 week ago

Terraform Core Version

1.5.7

AWS Provider Version

5.55.0

Affected Resource(s)

Expected Behavior

Objects of any size up to 5TB are copied.

Actual Behavior

Objects bigger than 5GB are not copied and result in an error.

Relevant Error/Panic Output Snippet

Error: copying REDACTED to S3 Bucket (REDACTED) Object (REDACTED): operation error S3: CopyObject, https response error StatusCode: 400, RequestID: 1ZHJYM7WKHP5A38D, HostID: wUmhlvya1F6GxTt2jkXHukRZ4j8CGdssRDvf/hcxhgfMkmc0sEaw2rhq5nTHehY/oi1zFqRcAAc=, api error InvalidRequest: The specified copy source is larger than the maximum allowable size for a copy source: 5368709120

Terraform Configuration Files

resource "aws_s3_object_copy" "this" {
  bucket = "somebucket"
  key    = "somedestination/hugefile"
  source = "samebucket/source/hugefile"
}

Steps to Reproduce

Try to copy a file of 6GB to another bucket or key inside the same bucket.

Debug Output

No response

Panic Output

No response

Important Factoids

The fix in #21727 does not include a change for that resource but only for creating bucket's object from local content. It should be extended to that resource too.

References

22379

Would you like to implement a fix?

No

github-actions[bot] commented 1 week ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue