How to initialize index.html on bucket without use of asset.zip or lambda? #25677
-
I have the above construction of a public bucket. I have to initialize index.html to be empty or have some dummy content otherwise the stack creation errors. I know that the recommended way to do this is the following:
However, when doing this, CDK generates additional files (asset zips) which are uploaded when the stack is run. This is kind of a dealbreaker for me since my stack is deployed via the AWS SDK for Cloudformation (not via the CDK Deploy command). I don't care at all what the contents of the Is there any way to initialize index.html without requiring separate asset zips? Would appreciate any guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Best way I found to do this was to use Cloudfront in front of the S3 Bucket.
Sometimes there are just too many ways to do something simple (host a static website) in AWS... |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Best way I found to do this was to use Cloudfront in front of the S3 Bucket.
Sometimes there are just too many ways to do something simple (host a static website) in AWS...