Skip to content

Commit

Permalink
Merge pull request #2 from marcelloromani/serve_static_website
Browse files Browse the repository at this point in the history
configure record alias to serve website from main domain
  • Loading branch information
marcelloromani authored Oct 30, 2023
2 parents c5d08f9 + 5bc8afc commit 160ab72
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions infra/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,18 @@ def build_public_read_policy_for_bucket(bucket_name):
source=FileAsset(file_path),
content_type=mime_type,
)

# serve the static S3 content as website
www_site_record = aws.route53.Record(
"www",
zone_id=lmgify_net_zone.id,
name="lmgify.net",
type="A",
aliases=[
aws.route53.RecordAliasArgs(
name=site_s3_bucket.website_endpoint,
zone_id=site_s3_bucket.hosted_zone_id,
evaluate_target_health=False,
)
],
)

0 comments on commit 160ab72

Please sign in to comment.