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

Simpler version of typescript/static-site #1018

Open
1 of 2 tasks
shamsch opened this issue Mar 26, 2024 · 1 comment · May be fixed by #1104
Open
1 of 2 tasks

Simpler version of typescript/static-site #1018

shamsch opened this issue Mar 26, 2024 · 1 comment · May be fixed by #1104
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@shamsch
Copy link

shamsch commented Mar 26, 2024

Describe the feature

Currently, typescript/static-site uses cloudfront, acm, route53 to direct the traffic from http to https. I propose a simpler version of static-site that skips that part and only provide a direct public link to the s3 object.

Use Case

Having cloudfront, acm, route53 makes deployment of a static html file with S3 more complicated than it needs to be. Sometime all you need is a proof of concept - and in such case going the extra length to have https support does not justify itself.

Proposed Solution

Essentially keep the stack the same as before and only keep the s3 bucket and make it publicly accessible. Also aligning with the current folder structure of cdk init and it will be stable unlike the current typescript/static-site

So in essence, deploy a html file to a S3 bucket that is publicly accessible so as to be able to access the file from the internet

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Language

Typescript

@shamsch shamsch added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 26, 2024
@danstoner
Copy link

danstoner commented Apr 26, 2024

It looks like the simplest possible s3 bucket website example is located in the documentation:

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment-readme.html

edit: That doc leaves out the additional properties on the Bucket that are necessary to actually get it to work:

      publicReadAccess: true,
      blockPublicAccess: new s3.BlockPublicAccess({
        blockPublicAcls: false,
        blockPublicPolicy: false,
        ignorePublicAcls: false,
        restrictPublicBuckets: false,
      }),

AND the account-level S3 Public settings must be configured appropriately (in the AWS Console).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
2 participants