Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emileten opened this issue Sep 13, 2023 · 0 comments
Open

Comments

@emileten
Copy link
Contributor

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,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant