Examples
The following examples create external volumes that define writable storage locations with different cloud providers:
Amazon S3
The following example creates an external volume that defines an Amazon S3 storage location with encryption:
CREATE OR REPLACE EXTERNAL VOLUME exvol
STORAGE_LOCATIONS =
(
(
NAME = 'my-s3-us-west-2'
STORAGE_PROVIDER = 'S3'
STORAGE_BASE_URL = 's3://my-example-bucket/'
STORAGE_AWS_ROLE_ARN = 'arn:aws:iam::123456789012:role/myrole'
ENCRYPTION=(TYPE='AWS_SSE_KMS' KMS_KEY_ID='1234abcd-12ab-34cd-56ef-1234567890ab')
)
)
ALLOW_WRITES = TRUE;
Google Cloud Storage
The following example creates an external volume that defines a GCS storage location with encryption:
CREATE EXTERNAL VOLUME exvol
STORAGE_LOCATIONS =
(
(
NAME = 'my-us-east-1'
STORAGE_PROVIDER = 'GCS'
STORAGE_BASE_URL = 'gcs://mybucket1/path1/'
ENCRYPTION=(TYPE='GCS_SSE_KMS' KMS_KEY_ID = '1234abcd-12ab-34cd-56ef-1234567890ab')
)
)
ALLOW_WRITES = TRUE;
Microsoft Azure
The following example creates an external volume that defines an Azure storage location with encryption:
CREATE EXTERNAL VOLUME exvol
STORAGE_LOCATIONS =
(
(
NAME = 'my-azure-northeurope'
STORAGE_PROVIDER = 'AZURE'
STORAGE_BASE_URL = 'azure://exampleacct.blob.core.windows.net/my_container_northeurope/'
AZURE_TENANT_ID = 'a123b4c5-1234-123a-a12b-1a23b45678c9'
)
)
ALLOW_WRITES = TRUE;
S3-compatible storage
Create an external volume that defines an S3-compatible storage location. For more information, see
Configure an external volume for S3-compatible storage.
CREATE OR REPLACE EXTERNAL VOLUME ext_vol_s3_compat
STORAGE_LOCATIONS = (
(
NAME = 'my_s3_compat_storage_location'
STORAGE_PROVIDER = 'S3COMPAT'
STORAGE_BASE_URL = 's3compat://mybucket/unload/mys3compatdata'
CREDENTIALS = (
AWS_KEY_ID = '1a2b3c...'
AWS_SECRET_KEY = '4x5y6z...'
)
STORAGE_ENDPOINT = 'example.com'
)
)
ALLOW_WRITES = FALSE;