location_s3s
Creates, updates, deletes, gets or lists a location_s3s resource.
Overview
| Name | location_s3s |
| Type | Resource |
| Id | aws.datasync.location_s3s |
Fields
The following fields are returned by SELECT queries:
- describe_location_s3
| Name | Datatype | Description |
|---|---|---|
agent_arns | array | The 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_time | string (date-time) | The time that the Amazon S3 location was created. |
location_arn | string | The 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_uri | string | The 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_config | object | Specifies 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_class | string | When 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_location_s3 | select | region | Provides details about how an DataSync transfer location for an S3 bucket is configured. | |
create_location_s3 | insert | region, S3BucketArn, S3Config | 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. | |
update_location_s3 | update | region, LocationArn | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_location_s3
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
- create_location_s3
- Manifest
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
;
# Description fields are for documentation purposes
- name: location_s3s
props:
- name: region
value: "{{ region }}"
description: Required parameter for the location_s3s resource.
- name: Subdirectory
value: "{{ Subdirectory }}"
description: |
Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location). DataSync can't transfer objects with a prefix that begins with a slash (/) or includes //, /./, or /../ patterns. For example: /photos photos//2006/January photos/./2006/February photos/../2006/March
- name: S3BucketArn
value: "{{ S3BucketArn }}"
description: |
Specifies the ARN of the S3 bucket that you want to use as a location. (When creating your DataSync task later, you specify whether this location is a transfer source or destination.) If your S3 bucket is located on an Outposts resource, you must specify an Amazon S3 access point. For more information, see Managing data access with Amazon S3 access points in the Amazon S3 User Guide.
- name: S3StorageClass
value: "{{ S3StorageClass }}"
description: |
Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination. For buckets in Amazon Web Services Regions, the storage class defaults to STANDARD. For buckets on Outposts, the storage class defaults to OUTPOSTS. For more information, see Storage class considerations with Amazon S3 transfers.
valid_values: ['STANDARD', 'STANDARD_IA', 'ONEZONE_IA', 'INTELLIGENT_TIERING', 'GLACIER', 'DEEP_ARCHIVE', 'OUTPOSTS', 'GLACIER_INSTANT_RETRIEVAL']
- name: S3Config
description: |
Specifies 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.
value:
BucketAccessRoleArn: "{{ BucketAccessRoleArn }}"
- name: AgentArns
value:
- "{{ AgentArns }}"
description: |
(Amazon S3 on Outposts only) Specifies the Amazon Resource Name (ARN) of the DataSync agent on your Outpost. For more information, see Deploy your DataSync agent on Outposts.
- name: Tags
description: |
Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your transfer location.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_location_s3
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;