Skip to main content

CDK Constructs for S3 Tables

Project description

Amazon S3 Tables Construct Library

---

cdk-constructs: Experimental

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Amazon S3 Tables

Amazon S3 Tables deliver the first cloud object store with built-in Apache Iceberg support and streamline storing tabular data at scale.

Product Page | User Guide

Usage

Define an S3 Table Bucket

# Build a Table bucket
sample_table_bucket = TableBucket(scope, "ExampleTableBucket",
    table_bucket_name="example-bucket-1",
    # optional fields:
    unreferenced_file_removal=UnreferencedFileRemoval(
        status=UnreferencedFileRemovalStatus.ENABLED,
        noncurrent_days=20,
        unreferenced_days=20
    )
)

Learn more about table buckets maintenance operations and default behavior from the S3 Tables User Guide

Controlling Table Bucket Permissions

# Grant the principal read permissions to the bucket and all tables within
account_id = "123456789012"
table_bucket.grant_read(iam.AccountPrincipal(account_id), "*")
# Grant the role write permissions to the bucket and all tables within
role = iam.Role(stack, "MyRole", assumed_by=iam.ServicePrincipal("sample"))
table_bucket.grant_write(role, "*")
# Grant the user read and write permissions to the bucket and all tables within
table_bucket.grant_read_write(iam.User(stack, "MyUser"), "*")

# Grant permissions to the bucket and a particular table within it
table_id = "6ba046b2-26de-44cf-9144-0c7862593a7b"
table_bucket.grant_read_write(iam.AccountPrincipal(account_id), table_id)

# Add custom resource policy statements
permissions = iam.PolicyStatement(
    effect=iam.Effect.ALLOW,
    actions=["s3tables:*"],
    principals=[iam.ServicePrincipal("example.aws.internal")],
    resources=["*"]
)

table_bucket.add_to_resource_policy(permissions)

Coming Soon

L2 Construct support for:

  • Namespaces
  • Tables

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_cdk_aws_s3tables_alpha-2.190.0a0.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cdk_aws_s3tables_alpha-2.190.0a0-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file aws_cdk_aws_s3tables_alpha-2.190.0a0.tar.gz.

File metadata

File hashes

Hashes for aws_cdk_aws_s3tables_alpha-2.190.0a0.tar.gz
Algorithm Hash digest
SHA256 461d8053d462a4c2aff08ac738b75e183c1a19e99750c817788ae46394200e9a
MD5 03588f16370e39ea24b587ad842b3963
BLAKE2b-256 e84e9a71c0422241ec97135d7101e9c2db50b50ba1f1b59b2cb437a32220d1a4

See more details on using hashes here.

File details

Details for the file aws_cdk_aws_s3tables_alpha-2.190.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_cdk_aws_s3tables_alpha-2.190.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 caf59d1cf3ba23835ad85280f12021b561ac7a68f46c44f6803737d6968f9b6a
MD5 4085cf4f24d7ea49cafde0068064109a
BLAKE2b-256 09389b8e147d5f84ba9d5bd6d9be95da9f35edf70401b53c84706fd33ebf6fa9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page