aws s3 cp <file_name> s3://<bucket_name>/upload failed: ./<file_name> to s3://<bucket_name>/<file_name> An error occurred (InvalidArgument) when calling the PutObject operation: The value provided in request header Content-Length is not valid.This issue occurs when the PUT request sent by the client to OSE does not include a Content-Length header.
This issue is under review by VMware Cloud Director Object Storage Extension Engineering.
Subscribe to this knowledge article to get updates on this issue.
To workaround the issue uploading with AWS CLI, the request_checksum_calculation configuration setting can be set to when_required in AWS CLI.
For more information on this configuration setting, see the AWS CLI user guide here, Configuration and credential file settings in the AWS CLI, Supported config file settings.
Disclaimer: Broadcom is not responsible for the reliability of any data, opinions, advice, or statements made on third-party websites. Inclusion of such links does not imply that Broadcom endorses, recommends, or accepts any responsibility for the content of such sites.
Example steps could be as follows:
aws configure --profile <profile_name>AWS Access Key ID [****************####]: <access_key>AWS Secret Access Key [****************####]: <secret_key>Default region name [None]:Default output format [None]:request_checksum_calculation configuration setting to when_required for the profile:aws configure set request_checksum_calculation when_required --profile <profile_name>Content-Length header will be sent:aws s3 cp <file_name> s3://<bucket_name>/ --profile <profile_name>