AWS: Basic Implementation
1. Create an S3 Bucket
- Go to the S3 section in the AWS Console and click Create bucket.
- Bucket name: Enter the domain name for your site (for example,
www.example.com).
💡 The bucket name should match your website domain for easier setup later. - Public access: Uncheck Block all public access.
⚠️ This will make your bucket publicly accessible, which is needed for static site hosting. - Bucket versioning: Choose Enable to turn on versioning.
- Click Create bucket to finish.
2. IAM Setup
- Go to IAM in AWS and click on Access Management > Users.
- Click Create User.
- Step 1: Enter a name for the user.
- Step 2: Add a custom policy:
- Select Attach Policy Directly.
- Click Create Policy — this will open a new tab.
- In the new tab, add this policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowUsersToAccessS3Bucket",
"Effect": "Allow",
"Action": [
"s3:GetObject*",
"s3:PutObject*",
"s3:DeleteObject*"
],
"Resource": [
"arn:aws:s3:::{YOUR BUCKET NAME}/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket*"
],
"Resource": [
"arn:aws:s3:::{YOUR BUCKET NAME}"
]
}
]
} - Back in the first tab, click the refresh button.
- Select the newly created policy.
- Click Next and then Create User.
- Create Credentials:
- Open the new user.
- Go to the Security Credentials tab.
- Click Create Access Keys.
- Step 1: Select anything, it doesn't matter.
- Step 2: Skip this.
- Step 3: ⚠️ Make sure to copy the key and the secret. You will not be able to see the secret again.
** This is the key and secret you need to add to the connector in the WCH app.
3. Set Up CI/CD Pipeline
- Go to CodePipeline in AWS and click Create pipeline.
- When prompted to choose the type, select Custom Pipeline.
- Pipeline name: Enter a name for your pipeline.
- On the next step, under Source provider, select S3.
- For the Bucket, choose the S3 bucket you created in step 1.
- For the Object key, enter
project.zip(or the name of the deployment ZIP file you'll upload). - Build stage: Skip this step (you don't need a build provider for static sites).
- Test stage: Skip this step (you don't have any tests to run for a static site).
- Deploy provider: On the next step, choose S3 again, and select the same bucket.
- Leave Deployment path empty.
- Check Extract File Before Deploy.
- Click Create pipeline to finish setup.
4. Configure S3 for Static Website Hosting and Permissions
- Go to your S3 bucket and open it.
- Permissions:
- Go to the Permissions tab.
- Find Bucket policy and click Edit.
- Paste the following policy, replacing
www.example.comwith your actual bucket name:{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::www.example.com/*"
}
]
}
- Static website hosting:
- Go to the Properties tab.
- Scroll down to Static website hosting.
- Select Enable and then choose Host a static website.
- For the index document, enter
index.htmland save changes. - After saving, copy the Bucket website endpoint URL.
5. Set Up CloudFront Distribution
- Go to CloudFront and click Create Distribution.
- Origin domain: Paste the S3 static website URL as the origin domain.
- Cache key and origin requests: Select Legacy cache settings.
- Set all TTL (Time-to-Live) values to
0to disable caching.
💡 This ensures changes from Wes are immediately visible, but you will not get the advantages of caching. For better performance, use the recommended cache settings, but updates from Wes may take longer to view. - Alternate Domain Name (CNAME): Click Add item and enter your website's domain name (for example,
www.example.com). - Click Create Distribution.
- Once the distribution is created, copy the CloudFront domain name.
- Update your DNS settings to add this as a CNAME record for your domain.
This setup is just a simple way to get started, you are free to customize it however you want. EA/Webflow is not responsible for client side configurations.