Skip to content

Add an option to make the stac-browser S3 bucket publicly accessible #71

@emileten

Description

@emileten

Recently it became non-trivial to create a publicly accessible S3 bucket with CDK code. Adding this as a boolean option to the stac browser options would be useful for users opting for static s3 website hosting -- it spares them these lines of code in their client :

stac_browser_bucket = s3.Bucket(
    browser_stack,
    "stac-browser-bucket",
    bucket_name=f"{APP_NAME}-{STAGE_NAME}",
    removal_policy=RemovalPolicy.DESTROY,
    auto_delete_objects=True,
    website_index_document="index.html",
    public_read_access=True,
    block_public_access=s3.BlockPublicAccess(
        block_public_acls=False,
        block_public_policy=False,
        ignore_public_acls=False,
        restrict_public_buckets=False,
    ),
    object_ownership=s3.ObjectOwnership.OBJECT_WRITER,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions