Documentation
Applications
Starter Templates
Web App on Aws Cloudfront

Web Application on AWS CloudFront

This application type is designed to deploy web applications to AWS CloudFront with build and pipeline configuration options.

Application Features

  • Application Overview: Deploy a web application hosted on AWS CloudFront.
  • Build Pipeline Setup: Configure build commands, dependency management, and build environments (Node.js, Python, etc.).
  • Environment Variables: Securely configure and store environment-specific settings.
  • Static Hosting: Set a default root object and integrate with CloudFront for global content delivery.
  • Vulnerability Scans: Enable optional scans for dependency vulnerabilities during the build process.

Getting Started

Enable WebApp

Web apps needs to be enabled per Project. This application type is not enabled by default and you will see a banner saying Enable Web Applications on AWS Cloudfront if the feature is not yet enabled in the project.

This features can be enabled in Features section under project settings as well.

First click on Enable button in the Support Web Apps Deployment on S3 widget.

Then select the cloudfront credentials for the relevant environments

Choose Application Type

Navigate to the Applications section of your project. Click on the + Create Application button to create a new application. Select Web Application on AWS CloudFront from the catalog.

Fill General Details

FieldDescriptionExample
NameName of the Application. This has to be unique across your project and should not contain special characters.web-cloudfront-app
DescriptionProvide a meaningful description for your application.Web app deployed to CloudFront

Authenticate

This template requires the source code repository to fetch and build your web application. Authenticate with GitHub to connect an existing repository for the application.

Select Repository

Select the GitHub repository containing your web application source code.

FieldDescription
Github AccountYour Github Organization / Account
RepositoryThe repository which holds the application code
BranchDefault branch for the repository. main is usually the default branch. Pipeline YAMLs will be stored here.

Configure Pipeline Triggers

Set up the triggers for your deployment pipeline, such as events like push or specific branch updates.

FieldDescriptionDefault
OnPipeline Trigger Eventpush
BranchesMultiple inputs for branch names or a regex. (Optional)main
TagsMultiple inputs for tag names or a regex (Optional)
PathsTrigger on specific path changes in a repository (Optional)

Each environment will have a different set of triggers. You can configure the triggers for each environment. Learn more in the Pipelines section.

Configure Build Pipeline

Define the build settings for your web application, such as the build environment, dependency manager, and build commands.

FieldDescriptionExample
Default Root ObjectThe default entry point for the application (e.g., index.html).index.html
HostChoose the hosting provider for deployment (default is CloudFront).CloudFront
Build EnvironmentSelect the environment for building the application (e.g., Node.js, Python).Node
Build Environment VersionSpecify the version of the build environment.Latest
Dependency ManagerSelect the dependency manager for your application (e.g., npm, yarn).npm
Dependency Manager Version(Optional) Specify the version of the dependency manager.latest
Install Dependencies CommandThe command to install dependencies.npm i
Build CommandThe command to build the application.npm run build
Build FolderThe folder where the build artifacts are stored.build
Scan Severity(Optional) Add a severity level for dependency scans.MEDIUM

Configure Environment Variables (Optional)

Securely store environment-specific settings for your web application.

Create Application

Once you have filled in all the details, click on the Create button to create the application.