S3 Cloudfront Assets Hosting
S3 and Cloudfront Asset Hosting Starter kit
GIT REPOSITORY
s3-cloudfront-assets-cdk
Effortlessly host your static assets on AWS S3 and serve them with lightning speed through AWS CloudFront using the power of AWS CDK.
Features
- AWS S3: Robust and scalable storage for your static assets.
- AWS CloudFront: Provides low-latency and fast content delivery.
- AWS CDK: Infrastructure as code, ensuring reliable deployments and configurations.
Pre-requisites
- AWS account.
- AWS CLI installed and configured.
- Node.js & NPM.
- AWS CDK installed (
npm install -g aws-cdk
).
Setup & Deployment
Configuration
Before deployment, ensure the configuration meets your needs. Edit the deployment/bin/config.ts
file:
export const configuration = {
repoName: "YOUR_REPO_NAME", // Name of your repository
certificateArn: "YOUR_CERT_ARN", // ARN of your SSL certificate in AWS Certificate Manager
domainName: "YOUR_DOMAIN_NAME", // Desired domain name for your CloudFront distribution
};
-
Clone the Repository:
git clone https://github.com/devkit-io/s3-cloudfront-assets-cdk.git cd s3-cloudfront-assets-cdk
-
Install Dependencies:
npm install
-
Bootstrap AWS CDK (if you haven't done this before):
cdk bootstrap
-
Deploy to AWS:
cdk deploy
Post-deployment, the CDK will display the CloudFront distribution URL.
Usage
Upon deployment, simply upload your assets to the designated S3 bucket. They'll then be readily accessible through the provided CloudFront distribution URL or the custom domain name you've configured.
Contribution
Contributions to this repository are not available as the project is locked to customization.
License
MIT License. See LICENSE for detailed information.
Support & Issues
For support or to address any issues, please raise an issue on the GitHub repository.
Deploy, relax, and enjoy your swift and scalable static asset delivery!