Skip to content

aws.s3control.get_bucket_replication

Example SQL Queries

SELECT * FROM
aws.s3control.get_bucket_replication
WHERE
"account_id" = 'VALUE'
AND "bucket" = 'VALUE';

Description

This operation gets an Amazon S3 on Outposts bucket’s replication configuration. To get an S3 bucket’s replication configuration, see GetBucketReplication in the Amazon S3 API Reference.

Returns the replication configuration of an S3 on Outposts bucket. For more information about S3 on Outposts, see Using Amazon S3 on Outposts in the Amazon S3 User Guide. For information about S3 replication on Outposts configuration, see Replicating objects for S3 on Outposts in the Amazon S3 User Guide.

It can take a while to propagate PUT or DELETE requests for a replication configuration to all S3 on Outposts systems. Therefore, the replication configuration that’s returned by a GET request soon after a PUT or DELETE request might return a more recent result than what’s on the Outpost. If an Outpost is offline, the delay in updating the replication configuration on that Outpost can be significant.

This action requires permissions for the s3-outposts:GetReplicationConfiguration action. The Outposts bucket owner has this permission by default and can grant it to others. For more information about permissions, see Setting up IAM with S3 on Outposts and Managing access to S3 on Outposts bucket in the Amazon S3 User Guide.

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by using the access point ARN, see the Examples section.

If you include the Filter element in a replication configuration, you must also include the DeleteMarkerReplication, Status, and Priority elements. The response also returns those elements.

For information about S3 on Outposts replication failure reasons, see Replication failure reasons in the Amazon S3 User Guide.

Table Definition

Column NameColumn Data Type
account_id Required Input Column

The Amazon Web Services account ID of the Outposts bucket.

VARCHAR
bucket Required Input Column

Specifies the bucket to get the replication information for.

For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.

For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/bucket/<my-bucket-name>. For example, to access the bucket reports through Outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports. The value must be URL encoded.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

replication_configuration

A container for one or more replication rules. A replication configuration must have at least one rule and you can add up to 100 rules. The maximum size of a replication configuration is 128 KB.

STRUCT(
"role" VARCHAR,
"rules" STRUCT(
"id" VARCHAR,
"priority" BIGINT,
"prefix" VARCHAR,
"filter" STRUCT(
"prefix" VARCHAR,
"tag" STRUCT(
"key" VARCHAR,
"value" VARCHAR
),
"and" STRUCT(
"prefix" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)
),
"status" VARCHAR,
"source_selection_criteria" STRUCT(
"sse_kms_encrypted_objects" STRUCT(
"status" VARCHAR
),
"replica_modifications" STRUCT(
"status" VARCHAR
)
),
"existing_object_replication" STRUCT(
"status" VARCHAR
),
"destination" STRUCT(
"account" VARCHAR,
"bucket" VARCHAR,
"replication_time" STRUCT(
"status" VARCHAR,
"time" STRUCT(
"minutes" BIGINT
)
),
"access_control_translation" STRUCT(
"owner" VARCHAR
),
"encryption_configuration" STRUCT(
"replica_kms_key_id" VARCHAR
),
"metrics" STRUCT(
"status" VARCHAR,
"event_threshold" STRUCT(
"minutes" BIGINT
)
),
"storage_class" VARCHAR
),
"delete_marker_replication" STRUCT(
"status" VARCHAR
),
"bucket" VARCHAR
)[]
)
Show child fields
replication_configuration.role

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts assumes when replicating objects. For information about S3 replication on Outposts configuration, see Setting up replication in the Amazon S3 User Guide.

replication_configuration.rules[]
Show child fields
replication_configuration.rules[].bucket

The Amazon Resource Name (ARN) of the access point for the source Outposts bucket that you want S3 on Outposts to replicate the objects from.

replication_configuration.rules[].delete_marker_replication

Specifies whether S3 on Outposts replicates delete markers. If you specify a Filter element in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication element's Status child element must be set to Disabled, because S3 on Outposts doesn't support replicating delete markers for tag-based rules.

For more information about delete marker replication, see How delete operations affect replication in the Amazon S3 User Guide.

Show child fields
replication_configuration.rules[].delete_marker_replication.status

Indicates whether to replicate delete markers.

replication_configuration.rules[].destination

A container for information about the replication destination and its configurations.

Show child fields
replication_configuration.rules[].destination.access_control_translation

Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].destination.access_control_translation.owner

Specifies the replica ownership.

replication_configuration.rules[].destination.account

The destination bucket owner's account ID.

replication_configuration.rules[].destination.bucket

The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.

replication_configuration.rules[].destination.encryption_configuration

A container that provides information about encryption. If SourceSelectionCriteria is specified, you must specify this element.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].destination.encryption_configuration.replica_kms_key_id

Specifies the ID of the customer managed KMS key that's stored in Key Management Service (KMS) for the destination bucket. This ID is either the Amazon Resource Name (ARN) for the KMS key or the alias ARN for the KMS key. Amazon S3 uses this KMS key to encrypt replica objects. Amazon S3 supports only symmetric encryption KMS keys. For more information, see Symmetric encryption KMS keys in the Amazon Web Services Key Management Service Developer Guide.

replication_configuration.rules[].destination.metrics

A container that specifies replication metrics-related settings.

Show child fields
replication_configuration.rules[].destination.metrics.event_threshold

A container that specifies the time threshold for emitting the s3:Replication:OperationMissedThreshold event.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].destination.metrics.event_threshold.minutes

Contains an integer that specifies the time period in minutes.

Valid value: 15

replication_configuration.rules[].destination.metrics.status

Specifies whether replication metrics are enabled.

replication_configuration.rules[].destination.replication_time

A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a Metrics block.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].destination.replication_time.status

Specifies whether S3 Replication Time Control (S3 RTC) is enabled.

replication_configuration.rules[].destination.replication_time.time

A container that specifies the time by which replication should be complete for all objects and operations on objects.

Show child fields
replication_configuration.rules[].destination.replication_time.time.minutes

Contains an integer that specifies the time period in minutes.

Valid value: 15

replication_configuration.rules[].destination.storage_class

The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the OUTPOSTS storage class. S3 on Outposts uses the OUTPOSTS storage class to create the object replicas.

Values other than OUTPOSTS aren't supported by Amazon S3 on Outposts.

replication_configuration.rules[].existing_object_replication

An optional configuration to replicate existing source bucket objects.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].existing_object_replication.status

Specifies whether Amazon S3 replicates existing source bucket objects.

replication_configuration.rules[].filter

A filter that identifies the subset of objects to which the replication rule applies. A Filter element must specify exactly one Prefix, Tag, or And child element.

Show child fields
replication_configuration.rules[].filter.and

A container for specifying rule filters. The filters determine the subset of objects that the rule applies to. This element is required only if you specify more than one filter. For example:

  • If you specify both a Prefix and a Tag filter, wrap these filters in an And element.

  • If you specify a filter based on multiple tags, wrap the Tag elements in an And element.

Show child fields
replication_configuration.rules[].filter.and.prefix

An object key name prefix that identifies the subset of objects that the rule applies to.

replication_configuration.rules[].filter.and.tags[]
Show child fields
replication_configuration.rules[].filter.and.tags[].key

Key of the tag

replication_configuration.rules[].filter.and.tags[].value

Value of the tag

replication_configuration.rules[].filter.prefix

An object key name prefix that identifies the subset of objects that the rule applies to.

When you're using XML requests, you must replace special characters (such as carriage returns) in object keys with their equivalent XML entity codes. For more information, see XML-related object key constraints in the Amazon S3 User Guide.

replication_configuration.rules[].filter.tag

A container for a key-value name pair.

Show child fields
replication_configuration.rules[].filter.tag.key

Key of the tag

replication_configuration.rules[].filter.tag.value

Value of the tag

replication_configuration.rules[].id

A unique identifier for the rule. The maximum value is 255 characters.

replication_configuration.rules[].prefix

An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in an Outposts bucket, specify an empty string.

When you're using XML requests, you must replace special characters (such as carriage returns) in object keys with their equivalent XML entity codes. For more information, see XML-related object key constraints in the Amazon S3 User Guide.

replication_configuration.rules[].priority

The priority indicates which rule has precedence whenever two or more replication rules conflict. S3 on Outposts attempts to replicate objects according to all replication rules. However, if there are two or more rules with the same destination Outposts bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.

For more information, see Creating replication rules on Outposts in the Amazon S3 User Guide.

replication_configuration.rules[].source_selection_criteria

A container that describes additional filters for identifying the source Outposts objects that you want to replicate. You can choose to enable or disable the replication of these objects.

Show child fields
replication_configuration.rules[].source_selection_criteria.replica_modifications

A filter that you can use to specify whether replica modification sync is enabled. S3 on Outposts replica modification sync can help you keep object metadata synchronized between replicas and source objects. By default, S3 on Outposts replicates metadata from the source objects to the replicas only. When replica modification sync is enabled, S3 on Outposts replicates metadata changes made to the replica copies back to the source object, making the replication bidirectional.

To replicate object metadata modifications on replicas, you can specify this element and set the Status of this element to Enabled.

You must enable replica modification sync on the source and destination buckets to replicate replica metadata changes between the source and the replicas.

Show child fields
replication_configuration.rules[].source_selection_criteria.replica_modifications.status

Specifies whether S3 on Outposts replicates modifications to object metadata on replicas.

replication_configuration.rules[].source_selection_criteria.sse_kms_encrypted_objects

A filter that you can use to select Amazon S3 objects that are encrypted with server-side encryption by using Key Management Service (KMS) keys. If you include SourceSelectionCriteria in the replication configuration, this element is required.

This is not supported by Amazon S3 on Outposts buckets.

Show child fields
replication_configuration.rules[].source_selection_criteria.sse_kms_encrypted_objects.status

Specifies whether Amazon S3 replicates objects that are created with server-side encryption by using an KMS key stored in Key Management Service.

replication_configuration.rules[].status

Specifies whether the rule is enabled.