Skip to content

Commit

Permalink
include stage in s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
anayeaye committed Dec 1, 2023
1 parent 6e8058a commit 5aacedd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
domain=domain,
)

website = VedaWebsite(veda_stack, "stac-browser-bucket")
website = VedaWebsite(
veda_stack, "stac-browser-bucket", stage=veda_app_settings.stage_name()
)

veda_routes = CloudfrontDistributionConstruct(
veda_stack,
Expand Down
3 changes: 2 additions & 1 deletion s3_website/infrastructure/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def __init__(
self,
scope: Construct,
construct_id: str,
stage: str,
**kwargs,
) -> None:
"""."""
Expand All @@ -31,7 +32,7 @@ def __init__(
self.bucket = s3.Bucket(
self,
construct_id,
bucket_name=f"{stack_name}-stac-browser",
bucket_name=f"{stack_name}-{stage}-stac-browser",
removal_policy=RemovalPolicy.DESTROY,
auto_delete_objects=True,
website_index_document="index.html",
Expand Down

0 comments on commit 5aacedd

Please sign in to comment.