aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

datasync create-location-object-storage requires --agent-arns despite documentation stating it's optional for agentless Enhanced mode transfers

Open ThomasMorrow-SOI opened this issue 2 months ago • 4 comments

Describe the bug

When attempting to create an Object Storage location for Google Cloud Storage without agents (for use with Enhanced mode), the create-location-object-storage command fails and demands the --agent-arns argument, even though the official documentation states:

"A DataSync agent is only required when using Basic mode tasks. If you are using Enhanced mode to transfer between Google Cloud Storage (GCS) and Amazon S3, then no agent is required."

And the CLI reference describes --agent-arns as:

"(Optional) Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter."

Regression Issue

  • [ ] Select this option if this issue appears to be a regression.

Expected Behavior

The command should succeed without specifying --agent-arns when creating a location for agentless cross-cloud transfers (GCS to S3).

Current Behavior

The command fails with an error requiring --agent-arns to be specified.

aws: error: the following arguments are required: --agent-arns

Reproduction Steps

aws datasync create-location-object-storage --server-hostname storage.googleapis.com --server-protocol HTTPS --server-port 443 --bucket-name my-gcs-bucket --subdirectory /my-folder --access-key GOOG1EXXXXXXXXXXXXXXXXXXXX --secret-key XXXXXXXXXXXXXXXXXXXXXXXXXXXX --region us-east-1

Possible Solution

No response

Additional Information/Context

This appears to be related to the recent launch of Enhanced mode support for cross-cloud transfers (announced May 29, 2025). The CLI validation logic may not have been updated to reflect that --agent-arns is optional for agentless transfers.

CLI version used

aws-cli/2.27.0 Python/3.14.0 Linux/6.17.1-300.fc43.x86_64 source/x86_64.fedora.43

Environment details (OS name and version, etc.)

OS: Fedora 43 Python Version: 3.14.0

ThomasMorrow-SOI avatar Oct 14 '25 13:10 ThomasMorrow-SOI