Skip to main content

location_s3s

Creates, updates, deletes, gets or lists a location_s3s resource.

Overview

Namelocation_s3s
TypeResource
Idaws.datasync.location_s3s

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_arnsarrayThe ARNs of the DataSync agents deployed on your Outpost when using working with Amazon S3 on Outposts. For more information, see Deploy your DataSync agent on Outposts.
creation_timestring (date-time)The time that the Amazon S3 location was created.
location_arnstringThe ARN of the Amazon S3 location. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$</code>)
location_uristringThe URL of the Amazon S3 location that was described. (pattern: <code>^(efs|nfs|s3|smb|hdfs|fsx[a-z0-9-]+):​//[a-zA-Z0-9.:/-]+$</code>)
s3_configobjectSpecifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket. For more information, see Providing DataSync access to S3 buckets.
s3_storage_classstringWhen Amazon S3 is a destination location, this is the storage class that you chose for your objects. Some storage classes have behaviors that can affect your Amazon S3 storage costs. For more information, see Storage class considerations with Amazon S3 transfers. (STANDARD, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_INSTANT_RETRIEVAL)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_location_s3selectregionProvides details about how an DataSync transfer location for an S3 bucket is configured.
create_location_s3insertregion, S3BucketArn, S3ConfigCreates a transfer location for an Amazon S3 bucket. DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you read the following topics: Storage class considerations with Amazon S3 locations Evaluating S3 request costs when using DataSync For more information, see Configuring transfers with Amazon S3.
update_location_s3updateregion, LocationArnModifies the following configuration parameters of the Amazon S3 transfer location that you're using with DataSync. Before you begin, make sure that you read the following topics: Storage class considerations with Amazon S3 locations Evaluating S3 request costs when using DataSync

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides details about how an DataSync transfer location for an S3 bucket is configured.

SELECT
agent_arns,
creation_time,
location_arn,
location_uri,
s3_config,
s3_storage_class
FROM aws.datasync.location_s3s
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a transfer location for an Amazon S3 bucket. DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you read the following topics: Storage class considerations with Amazon S3 locations Evaluating S3 request costs when using DataSync For more information, see Configuring transfers with Amazon S3.

INSERT INTO aws.datasync.location_s3s (
Subdirectory,
S3BucketArn,
S3StorageClass,
S3Config,
AgentArns,
Tags,
region
)
SELECT
'{{ Subdirectory }}',
'{{ S3BucketArn }}' /* required */,
'{{ S3StorageClass }}',
'{{ S3Config }}' /* required */,
'{{ AgentArns }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
location_arn
;

UPDATE examples

Modifies the following configuration parameters of the Amazon S3 transfer location that you're using with DataSync. Before you begin, make sure that you read the following topics: Storage class considerations with Amazon S3 locations Evaluating S3 request costs when using DataSync

UPDATE aws.datasync.location_s3s
SET
LocationArn = '{{ LocationArn }}',
Subdirectory = '{{ Subdirectory }}',
S3StorageClass = '{{ S3StorageClass }}',
S3Config = '{{ S3Config }}'
WHERE
region = '{{ region }}' --required
AND LocationArn = '{{ LocationArn }}' --required;