AWS Community Quick Starts

Swift Web Apps on AWS

Deploy a Swift web app using Vapor on Amazon ECS

This Quick Start helps you deploy web applications written with the Swift programming language on the AWS Cloud.

Swift is a programming language used to write applications for the Apple iOS, OS X, watchOS, and tvOS platforms. This Quick Start uses Vapor as the web framework for running server-side applications written in Swift, and Docker containers with the Amazon EC2 Container Service (Amazon ECS), to create a homogeneous, scalable application stack on AWS.

Use this Quick Start to set up a Swift development environment in a few simple steps, in about 10 minutes, on AWS.

This Quick Start was developed by
AWS solutions architects.

  •  What you'll build
  •  How to deploy
  •  Cost and licenses
  •  What you'll build
  • Use this Quick Start to set up the following Swift development environment on AWS:

    • A virtual private cloud (VPC) that includes a public and private subnet.
    • In the public subnet, a bastion host for secure access to the internet. The bastion host also includes a prebuilt Swift development environment consisting of the AWS Command Line Interface (AWS CLI), Docker, and Git for your convenience.
    • In the private subnet, Amazon EC2 Container Service (Amazon ECS) for running containerized applications on a managed cluster of Amazon EC2 instances.
    • Amazon EC2 Container Registry (Amazon ECR) for storing, managing, and deploying Docker container images.
  •  How to deploy
  • Build your Swift web application development environment on AWS:

    1. If you don't already have an AWS account, sign up at https://aws.amazon.com.
    2. Launch the Quick Start. The deployment takes about 10 minutes.
    3. Configure the Swift development environment and run a demo app. You can also extend or use this environment for your production work.
    4. Reset or remove the demo.

     

  •  Cost and licenses
  • You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using the Quick Start.

    The AWS CloudFormation template for this Quick Start includes configuration parameters that you can customize. Some of these settings, such as instance type, will affect the cost of deployment. See the pricing pages for each AWS service you will be using or the AWS Simple Monthly Calculator for cost estimates.

    This Quick Start doesn’t require a license for the Swift programming language or for Vapor, which are both open source.