CLOUD_STORAGE (S3) in the information_schema.locations view. For a comprehensive guide to LOCATION objects, see LOCATION objects. For more on location objects syntax in general, see CREATE LOCATION.
Topics:
Syntax
AMAZON_S3 is supported as an alias for CLOUD_STORAGE.
Parameters
Common Parameters
| Parameter | Description |
|---|---|
<location_name> | A unique identifier for the location within your account. |
SOURCE | The external data source type. For Amazon S3 locations, you can use either CLOUD_STORAGE (which auto-infers the storage backend from the URL) or AMAZON_S3 (which is an alias for CLOUD_STORAGE with an S3 URL). |
DESCRIPTION | Optional metadata describing the location’s purpose. |
Amazon S3 Parameters
| Parameter | Description |
|---|---|
SOURCE | Can be set to CLOUD_STORAGE (recommended, auto-infers backend from URL) or AMAZON_S3 (alias for CLOUD_STORAGE with S3 URL) for Amazon S3 locations. |
CREDENTIALS | Authentication credentials for Amazon S3 access. |
URL | The data source URL in the format: s3://{bucket_name}/{path}. This must be a valid S3 URL. |
AWS Authentication Parameters
| Parameter | Description |
|---|---|
AWS_ACCESS_KEY_ID | Your AWS access key ID for key-based authentication. |
AWS_SECRET_ACCESS_KEY | Your AWS secret access key for key-based authentication. |
AWS_SESSION_TOKEN | Optional temporary session token for temporary credentials. |
AWS_ROLE_ARN | The ARN of the IAM role to assume for role-based authentication. |
AWS_ROLE_EXTERNAL_ID | Optional external ID for role assumption. |
Examples
- Authenticate using an access key
- Authenticate using a role
- Create a location with an AWS session token
Authenticate using an access key
The following code examples use keys to authenticate to AWS. BothCLOUD_STORAGE and AMAZON_S3 are shown:
Authenticate using a role
The following code examples use a role to authenticate to AWS. BothCLOUD_STORAGE and AMAZON_S3 are shown:
Create a location with an AWS session token
The following code examples create a location object namedmy_location, for an Amazon S3 data source with the specified URL and AWS session token. Both CLOUD_STORAGE and AMAZON_S3 are shown: