AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::DataSync::LocationS3

CfnLocationS3

The `AWS::DataSync::LocationS3` resource specifies an endpoint for an Amazon S3 bucket. For more information, see the [*AWS DataSync User Guide*](https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html) .

Import

import { CfnLocationS3 } from 'aws-cdk-lib/aws-datasync';

Or use the module namespace:

import * as datasync from 'aws-cdk-lib/aws-datasync';
// datasync.CfnLocationS3

Properties

Configuration passed to the constructor as CfnLocationS3Props.

s3ConfigRequired
IResolvable | S3ConfigProperty

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket. For detailed information about using such a role, see [Creating a Location for Amazon S3](https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location) in the *AWS DataSync User Guide* .

s3BucketArnOptional
string | IBucketRef

The ARN of the Amazon S3 bucket.

s3StorageClassOptional
string

The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For buckets in AWS Regions , the storage class defaults to S3 Standard. For more information about S3 storage classes, see [Amazon S3 Storage Classes](https://docs.aws.amazon.com/s3/storage-classes/) . Some storage classes have behaviors that can affect your S3 storage costs. For detailed information, see [Considerations When Working with Amazon S3 Storage Classes in DataSync](https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes) .

Default: - "STANDARD"

subdirectoryOptional
string

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`

tagsOptional
CfnTag[]

Specifies labels that help you categorize, filter, and search for your AWS resources. We recommend creating at least a name tag for your transfer location.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter