Proposal: Static Websites #2743
Replies: 22 comments
-
This would be very helpful currently i have already done this by using CodePipeline, CodeBuild and CFN resources with CustomResources as followed:
These steps are used by web applications that are build for Aurelia or Angular they have a build system that point to a specific version in the index.html file: |
Beta Was this translation helpful? Give feedback.
-
Ideally, for me, I'd like SAM to handle the bucket content and not any of the configuration. This has use cases past just static web content. Something fairly simple such as:
During the Then during deployment the custom CloudFormation resource can pull in that content artifact and perform the appropriate sync operation with the target bucket. |
Beta Was this translation helpful? Give feedback.
-
I like the spirit behind this idea! A very common task that many orgs have to do frequently and there are multiple steps involved. I would suggest one more feature to add to your list:
|
Beta Was this translation helpful? Give feedback.
-
These are great. Thanks for the input so far! |
Beta Was this translation helpful? Give feedback.
-
I think a CloudFront OAI is preferrable to using a WebsiteConfiguration on an S3 bucket. |
Beta Was this translation helpful? Give feedback.
-
I'd like CodeUri to be able to be either a list, overlaying multiple directories into the same space, or a map, with the keys being prefixes. I'm on board with @brysontyrrell that web hosting is less important to me than just deployment of objects. |
Beta Was this translation helpful? Give feedback.
-
Every single page webapp and static generators could benefit (Angular, React, Ember, Jekyll, ... ) |
Beta Was this translation helpful? Give feedback.
-
One of the things that i have ran into is that i needed to set the ContentType to @brettstack do you have a general idea how this feature will work in SAM and what we can do to help out? |
Beta Was this translation helpful? Give feedback.
-
@Nr18 I have a general idea as I've done this setup before. This repo by Eric Hammond is similar to what we have in mind https://github.com/alestic/aws-git-backed-static-website. There was also the recently released Amplify Console https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-aws-amplify-console/ so we want to consider this as an option, e.g you can set We're still gathering feedback and customer requirements, but I will tell you that this is one feature I'm particularly excited about and will check back in when I have an RFC. |
Beta Was this translation helpful? Give feedback.
-
Would this be applicable to static content for dynamic websites? |
Beta Was this translation helpful? Give feedback.
-
Maybe it's worth wrapping this into a serverless transform? https://github.com/serverlesspub/cloudformation-deploy-to-s3/blob/master/example/template.yml |
Beta Was this translation helpful? Give feedback.
-
I know this is a proposal for Static Websites, elaborating further on @faermanj's suggestion, I think it could very well extend to following architecture:
At my organization, I am trying to push for SAM based deployment for our Full Stack SPA/MPA based Javascript Projects. IMHO a ton of projects that could easily be refactored from |
Beta Was this translation helpful? Give feedback.
-
Hello! Could you elaborate on the status of this feature please? I'm looking into AWS cloud infrastructure for my next project and I'm choosing between AWS SAM and Serverless Framework to manage it. And I'm a bit surprised that SAM doesn't provide a straightforward way to deploy static content (by looking at the docs at least). |
Beta Was this translation helpful? Give feedback.
-
Thanks for reaching out @slavafomin. We recently finalized our design for custom domains (2 and 3 in this proposal) and it will certainly help towards this feature. Please take a look at Custom Domains Project Board to track our progress on it. |
Beta Was this translation helpful? Give feedback.
-
Related to this, I created a SAM project called https://github.com/smoketurner/sam-cdn and is available within the Serverless Application Repository at https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:860114833029:applications~cloudfront-cdn that aims to simplify this pattern I was repeating over and over again. This pattern allows you to plugin API Gateway or AppSync with a custom domain fairly easily and using CloudFront + S3 for static content serving. |
Beta Was this translation helpful? Give feedback.
-
In the API Gateway Developer Portal, we're currently copying it into a simple lambda so we can upload it to an S3 bucket, so we can support one-click install through SAR. Something like |
Beta Was this translation helpful? Give feedback.
-
@praneetap thank you for looking into this feature! It would be of great help if you could please provide an update on this |
Beta Was this translation helpful? Give feedback.
-
This feature aligns with our thinking on the next set of serverless abstractions. |
Beta Was this translation helpful? Give feedback.
-
#2819 is something that people will likely need for this use case. |
Beta Was this translation helpful? Give feedback.
-
does this exist yet? |
Beta Was this translation helpful? Give feedback.
-
https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-cloudfront-hosting-toolkit/ Is also available now too |
Beta Was this translation helpful? Give feedback.
-
SAM should provide a way to easily create static websites hosted on S3 and CloudFront. The purpose of this Issue is to gather requirements from the community to ensure we address primary use-cases.
Requirements:
WebsiteConfiguration
CodeUri
which points to the assets directory to upload to S3.CodeUri
should be optional to allow users to handle UI deployments external to SAM.Please describe your use case and let us know how SAM could make it easier for you to create websites.
Beta Was this translation helpful? Give feedback.
All reactions