odfdata / webflow-aws Goto Github PK
View Code? Open in Web Editor NEWPython code to deploy your Webflow static website in AWS using Cloud Formation.
Home Page: https://pypi.org/project/webflow-aws/
License: Apache License 2.0
Python code to deploy your Webflow static website in AWS using Cloud Formation.
Home Page: https://pypi.org/project/webflow-aws/
License: Apache License 2.0
Write a blogpost on Medium about this repo, webflow and how this tool simplifies a serverless webflow website deployment.
Is your feature request related to a problem?
No.
Describe the solution you'd like
At the moment, the user doesn't know if there's a new version available. He has to run the command pip3 install webflow-aws --upgrade
to upgrade the tool, if a new version is available.
It would be better if we suggest the user update the tool once he runs one of the available commands.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
I may want a CNAME to be just a redirect to another CNAME. Allow a user to configure .yaml file so that certain CNAMEs are just redirects. Idea
CNAMEs:
- "example.com"
- "old.example.com"
- "www.example.com"
CNAMEs_redirect:
- from:
- example.com
- old.example.com
to:
- www.example.com
Describe alternatives you've considered
Not yet considered
Describe the solution you'd like
Currently to deploy the Cloud Formation template, we copy the app.py file locally and run the deployment. We can do two improvements
app.py
file as hidden, so .app.py
I think a good improvement will be to avoid as much as possible copy and removing files in the folder of the website.
Remove the folder cdk.out
at the end of the deployment. It's the folder generated by aws-cdk
in which it saved the CloudFormation template generated.
Firstly I want to say this is an awesome workflow. Much needed for getting a decent deployment without paying $20 for Webflow Hosting. Love it.
Some additional features I'd love to see (and will help try to contribute if you agree)
I hope some of these are exciting. let me know what you'd like to prioritize and I can help build this out.
Before the section Create webflow-aws-config.yaml file
, add a section to explain how to manage domains:
Also, explain how to manage all the domains (the CNAMEs).
At the moment, the only Domain Registrar supported is AWS Route53.
Find a way to support other Domain Registrar (like Google Domains, GoDaddy, etc) updating the CloudFormation stack and providing the correct outputs (TXT Records for the SSL Certificate and A Record for the CloudFront distribution created)
It would be great to apply AWS tags to created resources which provides for easier management of resources in AWS.
Is your feature request related to a problem?
No.
Describe the solution you'd like
At the moment, I can see the webflow-aws
's version using the command pip3 show webflow-aws
. It would be better if the users can see the version of this tool, running this command webflow-aws --version
Expand Yaml configuration for basic auth via Lamba function (https://dev.to/tastefulelk/basic-authentication-with-lambda-edge-23o5) so that you can password protect websites (or a subdomain in that website as under development)
Upload the python package to Pypi under the CreateIn Cloud account. Thanks to this website, the users will be able to install it using pip
.
These parameters need to be fixed so the user has fewer parameters to set. They are parameters you can generate using the information provided by the configuration file.
Describe the solution you'd like
Instead of asking to the user the Route53 ID and Name, just ask the ID and get the Name with API call to Boto3 method get_hosted_zone()
.
In this way we reduce the amount of data asked to the user (thus, errors) and we can run a check before launching the stack.
Describe alternatives you've considered
Currently we're asking the user for both Route53 ID and Name
Perhaps can also expand functionality to support Cloudflare Workers so this can be Webflow to AWS or CloudFlare
The suggested method to install the tool needs to be through Pypi. Suggest upgrading the package, if it's already installed.
What is written now needs to be moved under the section Advanced installation
. This section needs the following updates:
{version}
parameter and specify that the version depends on the version you can see in the setup.py
fileThere is this article that explains how to do everything manually:
https://www.davidbaumgold.com/tutorials/host-static-site-aws-s3-cloudfront/
Why not proposing this tool?
When the user runs the webflow-aws setup
command and the creation of the stack starts, you should show the progress of the creation. At the moment, it seems stuck for 2 minutes and then the user can see an output saying: Everything has been created
.
The progress could be shown using the dots refreshed every X seconds. I suggest you to use the progress bar from Click.
If the creation of the AWS CloudFormation stack fails, the tool doesn't do anything. It doesn't manage the error.
Is your feature request related to a problem?
No.
Describe the solution you'd like
The configuration file is created thanks to the webflow-aws create-config
command but the file can be updated manually by the user. Create a function to validate the configuration parameters.
Create this command to help the user to create the webflow-aws-config.yaml
following a guide.
If the file is already present in the current folder, show a warning to the user to confirm the operation.
Multi-site deployments by specifying which subdirectory in the root needs to be deployed to which domain
Describe the bug
I would like to create two different websites using the same AWS account but I can just create one. If I try to create the second one, it raises the error saying: the AWS Lambda Function CloudFront_WWW_editPathForOrigin already exists
.
To Reproduce
Steps to reproduce the behavior:
webflow-aws setup
webflow-aws publish
using one configuration.yaml filewebflow-aws publish
using another configuration.yaml file containing one different website you want to deploy.You'll see the error specified above.
Desktop:
Hi! Another idea. I was wondering if there could be a way with this tool to also export the database from webflow and have it hosted on AWS as well.
@xavierpeich believes it's possible to export the CMS: https://university.webflow.com/lesson/export-collection-content.
Now you might be right they are server-side rendered. What I would have in mind is importing the CMS into a DynamoDB, and mapping it somehow.
Let's say after a single deployment I add another domain name. Is the SSL certificate correctly updated? Both using Route 53 (that's what I expect) and with custom DNS manager?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.