FortiGate EC2 Auto Scaling on the AWS Cloud

Quick Start Reference Deployment

QS

November 2020
Kimberly Lee, Jayden Liang, Daniel Chao, and Jamie Pate, Fortinet
Shivansh Singh and Tony Bulding, AWS Quick Start team

Visit our GitHub repository for source files and to post feedback, report bugs, or submit feature ideas for this Quick Start.

This Quick Start was created by Fortinet in collaboration with Amazon Web Services (AWS). Quick Starts are automated reference deployments that use AWS CloudFormation templates to deploy key technologies on AWS, following AWS best practices.

Overview

This guide provides instructions for deploying the Fortinet FortiGate EC2 Auto Scaling Quick Start reference architecture on the AWS Cloud.

This Quick Start is for IT infrastructure architects, administrators, DevOps professionals, and others who plan to implement or extend Fortinet’s Security Fabric workloads on the AWS Cloud.

Amazon may share user-deployment information with the AWS Partner that collaborated with AWS on the Quick Start.

FortiGate EC2 Auto Scaling on AWS

FortiGate midrange next-generation firewalls provide high-performance, multilayered advanced security and visibility to protect against cyberattacks while reducing complexity. FortiGate firewalls are built with security processors to enable threat protection and performance for Secure Sockets Layer (SSL)–encrypted traffic.

Multiple FortiGate instances form an Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling group to provide efficient clustering at times of high workloads. FortiGate instances can be scaled out automatically according to predefined workload levels. When a spike in traffic occurs, FortiGate instances are automatically added to the Amazon EC2 Auto Scaling group. EC2 Auto Scaling is achieved by using FortiGate-native high-availability features that synchronize operating-system configurations across multiple FortiGate instances at the time of scale-out events.

By integrating FortiAnalyzer, this reference architecture consolidates logging and reporting for your FortiGate cluster.

AWS costs

You are responsible for the cost of the AWS services and any third-party licenses used while running this Quick Start. There is no additional cost for using the Quick Start.

The AWS CloudFormation templates for Quick Starts include configuration parameters that you can customize. Some of the settings, such as the instance type, affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you use. Prices are subject to change.

After you deploy the Quick Start, create AWS Cost and Usage Reports to deliver billing metrics to an Amazon Simple Storage Service (Amazon S3) bucket in your account. These reports provide cost estimates based on usage throughout each month and aggregate the data at the end of the month. For more information, see What are AWS Cost and Usage Reports?

Software licenses

This Quick Start can deploy FortiGate on-demand or Bring Your Own License (BYOL) instances. You pay an hourly fee based on the EC2 instance type. A license is required for each FortiGate BYOL instance you might use. Licenses can be purchased from FortiCare. If your deployment will contain BYOL instances, place the license key in an S3 bucket and provide the bucket name (QSS3BucketName) when you launch the stack. For instructions, see the Deployment steps section of this guide.

This Quick Start requires a subscription to one or more of the following AMIs available in AWS Marketplace:

Architecture

Deploying this Quick Start for a new virtual private cloud (VPC) with default parameters builds the following FortiGate EC2 Auto Scaling environment in the AWS Cloud.

Architecture
Figure 1. Quick Start architecture for FortiGate EC2 Auto Scaling on AWS

As shown in Figure 1, the Quick Start sets up the following:

  • A highly available architecture that spans two Availability Zones.*

  • A VPC configured with public and private subnets, according to AWS best practices, to provide you with your own virtual network on AWS.*

  • An internet gateway to provide access to the internet.*

  • In the public subnets:

    • A FortiAnalyzer instance, which consolidates logging and reporting for your FortiGate cluster.

    • Within the FortiGate cluster, Amazon EC2 Auto Scaling groups of FortiGate instances that use Bring Your Own License model (BYOL) licenses or on-demand licenses. This cluster contains the following:

      • Two or more FortiGate instances, which complement AWS security groups (not shown). Security groups provide intrusion protection, web filtering, and threat detection to help protect your services from cyberattacks. Each instance also provides VPN access for authorized users.

      • A main FortiGate instance, which acts as a NAT gateway, allowing outbound internet access for resources in the private subnets.*

  • A public Network Load Balancer that distributes inbound traffic across the FortiGate instances.

  • (Optional) A private Network Load Balancer that distributes inbound traffic across the workload instances that you want to protect from outside access.

  • AWS Lambda, which provides the core Amazon EC2 Auto Scaling functionality between FortiGate instances.

  • Amazon Simple Storage Service (Amazon S3) to host artifacts for Lambda functions and logs.

  • Amazon DynamoDB to store information about Amazon EC2 Auto Scaling condition states.

*The template that deploys the Quick Start into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Planning the deployment

Specialized knowledge

This deployment requires a moderate level of familiarity with AWS services. If you’re new to AWS, see Getting Started Resource Center and AWS Training and Certification. These sites provide materials for learning how to design, deploy, and operate your infrastructure and applications on the AWS Cloud.

This Quick Start also assumes familiarity with Fortinet FortiGate next-generation firewall technology, including configuration of a FortiGate using the command-line interface (CLI).

AWS account

If you don’t already have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions. Part of the sign-up process involves receiving a phone call and entering a PIN using the phone keypad.

Your AWS account is automatically signed up for all AWS services. You are charged only for the services you use.

Technical requirements

Before you launch the Quick Start, review the following information and ensure that your account is properly configured. Otherwise, deployment might fail.

Resource quotas

If necessary, request service quota increases for the following resources. You might request quota increases to avoid exceeding the default limits for any resources that are shared across multiple deployments. The Service Quotas console displays your usage and quotas for some aspects of some services. For more information, see What is Service Quotas? and AWS service quotas.

Resource This deployment uses

VPCs

1

Elastic IP address (only if FortiAnalyzer is used)

1

Security groups

3

IAM roles

7

Amazon EC2 Auto Scaling groups

2

Network Load Balancer, public

1

(Optional) Network Load Balancer, private

1

FortiGate instances, c5.large

2 or more

(Optional) FortiAnalyzer instance, m4.large

1

Supported Regions

This Quick Start supports the following Regions:

  • us-east-1, US East (N. Virginia)

  • us-east-2, US East (Ohio)

  • us-west-2, US West (Oregon)

  • eu-central-1, Europe (Frankfurt)

  • ca-central-1, Canada (Central)

  • ap-south-1, Asia Pacific (Mumbai)

Certain Regions are available on an opt-in basis. For more information, see Managing AWS Regions.

EC2 key pairs

Make sure that at least one Amazon EC2 key pair exists in your AWS account in the Region where you plan to deploy the Quick Start. Make note of the key pair name. You need it during deployment. To create a key pair, see Amazon EC2 key pairs and Linux instances.

For testing or proof-of-concept purposes, we recommend creating a new key pair instead of using one that’s already being used by a production instance.

IAM permissions

Before launching the Quick Start, you must sign in to the AWS Management Console with IAM permissions for the resources that the templates deploy. The AdministratorAccess managed policy within IAM provides sufficient permissions, although your organization may choose to use a custom policy with more restrictions. For more information, see AWS managed policies for job functions.

Deployment options

This Quick Start provides two deployment options:

  • Deploy FortiGate EC2 Auto Scaling into a new VPC. This option builds a new AWS environment consisting of the VPC, subnets, network address translation (NAT) gateways, security groups, bastion hosts, and other infrastructure components. It then deploys FortiGate EC2 Auto Scaling into this new VPC.

  • Deploy FortiGate EC2 Auto Scaling into an existing VPC. This option provisions FortiGate EC2 Auto Scaling in your existing AWS infrastructure.

The Quick Start provides separate templates for these options. It also lets you configure Classless Inter-Domain Routing (CIDR) blocks, instance types, and FortiGate EC2 Auto Scaling settings, as discussed later in this guide.

Incoming and outgoing requests

Incoming requests go through a connection that flows through the internet gateway, Network Load Balancer, and FortiGate EC2 Auto Scaling group before reaching the protected instances in the private subnets in your existing VPC. The protected instances return a response using the same connection.

Outgoing requests from the protected instances go through one FortiGate instance in an Amazon EC2 Auto Scaling group and the internet gateway to the public network. The public network returns the response using the same path.

Remove any existing NAT device routes from existing route tables associated with the private subnets. The Quick Start automatically attaches a proper route (as described earlier) to the route table.

Deployment steps

Sign in to your AWS account

  1. Sign in to your AWS account at https://aws.amazon.com with an IAM user role that has the necessary permissions. For details, see Planning the deployment earlier in this guide.

  2. Make sure that your AWS account is configured correctly, as discussed in the Technical requirements section.

Subscribe to one or more FortiGate EC2 Auto Scaling AMIs

This Quick Start requires a subscription to one or more AMIs available in AWS Marketplace. See the Software licenses section of this guide.

  1. Sign in to your AWS account.

  2. For each AMI you will subscribe to, open the page for the AMI in AWS Marketplace and choose Continue to Subscribe.

  3. Review the terms and conditions for software usage, and then choose Accept Terms.
    A confirmation page loads, and an email confirmation is sent to the account owner. For detailed subscription instructions, see the Getting started page in the AWS Marketplace Buyer Guide.

  4. When the subscription process is complete, exit out of AWS Marketplace without further action. Do not provision the software from AWS Marketplace—the Quick Start deploys the AMI for you.

If your deployment will contain BYOL instances:

  1. Navigate to the GitHub repository for the Quick Start and download the repository.

  2. Unzip the file on your local machine.

  3. Create an S3 bucket for your deployment. The name of the S3 bucket is used for the parameter Quick Start S3 bucket name (QSS3BucketName). This name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).

  4. Inside this directory, create another directory to store the deployment resources. The name of this directory is used for the parameter Quick Start S3 key prefix (QSS3KeyPrefix). The S3 key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/).

  5. Navigate to this second directory and upload the files and directories you extracted in step 2 to this location.

  6. Navigate to the assets directory, create a directory named fgt-asg-license, and upload your FortiGate license files to this directory.

Launch the Quick Start

If you’re deploying FortiGate EC2 Auto Scaling into an existing VPC, make sure that your VPC has two private subnets in different Availability Zones for the workload instances and that the subnets aren’t shared. This Quick Start doesn’t support shared subnets. These subnets require NAT gateways in their route tables to allow the instances to download packages and software without exposing them to the internet. Also make sure that the domain name option in the DHCP options is configured as explained in DHCP options sets. You provide your VPC settings when you launch the Quick Start.
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 this Quick Start. For full details, see the pricing pages for each AWS service used by this Quick Start. Prices are subject to change.

Each deployment takes about 10 minutes to complete.

  1. Sign in to your AWS account, and choose one of the following options to launch the AWS CloudFormation template. For help with choosing an option, see Deployment options earlier in this guide.

Deploy FortiGate EC2 Auto Scaling into a new VPC on AWS

Deploy FortiGate EC2 Auto Scaling into an existing VPC on AWS

  1. Check the AWS Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This is where the network infrastructure for FortiGate EC2 Auto Scaling will be built. The template is launched in the us-east-2 Region by default.

  1. On the Create stack page, keep the default setting for the template URL, and then choose Next.

  2. On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. For details on each parameter, see the Parameter reference section of this guide. When you finish reviewing and customizing the parameters, choose Next.

  3. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you’re finished, choose Next.

  4. On the Review page, review and confirm the template settings. Under Capabilities, select the two check boxes to acknowledge that the template creates IAM resources and might require the ability to automatically expand macros.

  5. Choose Create stack to deploy the stack.

  6. Monitor the status of the stack. When the status is CREATE_COMPLETE, the FortiGate EC2 Auto Scaling deployment is ready.

  7. Use the values displayed in the Outputs tab for the stack, as shown in Figure 2, to view the created resources.

cfn_outputs
Figure 2. FortiGate EC2 Auto Scaling outputs after successful deployment

Test the deployment

FortiGate EC2 Auto Scaling creates two Amazon EC2 Auto Scaling groups with an elected main instance.

  1. Confirm that the Amazon EC2 Auto Scaling groups were created after completion of the AWS CloudFormation stack. The name of each group starts with the prefix you specified in Resource tag prefix. Confirm that the number in the Instances column is equal to or greater than the capacity you specified in the Desired column.

    test_deployment_1
    Figure 3. Confirming the number of Amazon EC2 Auto Scaling groups
  2. Confirm that all FortiGate instances are running.

    test_deployment_2
    Figure 4. Confirming that all FortiGate instances are running
  3. Confirm that a main instance was elected. Look up the DynamoDB table <ResourceTagPrefix>-FortiGateMasterElection. Select the Items tab and open the master record (the only item listed). A master has been elected when the voteState is done.

    test_deployment_3
    Figure 5. Confirming that a main instance was elected
  4. Make note of the instance ID (instanceID). You will need it to connect to the main FortiGate instance.

Post-deployment steps

Connect to the main FortiGate instance

To connect to the main FortiGate instance, you need a login URL, a user name, and a password.

  1. Construct the login URL in this way: https://<IPAddress>:<Port>/. <Port> refers to the parameter Admin port specified during FortiGate configuration. <IPAddress> refers to the IPv4 public IP address of the FortiGate. This IP address is listed under the Description tab for the instance, as shown in Figure 6. In the Amazon EC2 management console, locate the instance using the instance ID of the main instance.

    post_deployment_1
    Figure 6. IPv4 public IP address of the FortiGate instance
  2. Open an HTTPS session and go to the login URL.

    Your browser displays a certificate error message. This is normal because the default FortiGate certificate is self-signed and not recognized by browsers. Proceed past this error. Later, you can upload a publicly signed certificate to avoid this error.

  3. Log in to the FortiGate with the user name admin and the default password <instanceID>.

    This is the initial password for all FortiGate instances because the main FortiGate propagates the password to all secondary FortiGate instances. If failover occurs before the password is changed, you will need this initial password since the newly elected main FortiGate will still have the initial password of the previous main instance.

  4. When you are prompted at the first-time login, change the password.

    Change the password only on the main FortiGate instance. This instance propagates the password to all FortiGate instances in the Amazon EC2 Auto Scaling group. Any password changed on a secondary FortiGate is overwritten with the main FortiGate’s password.

    The FortiGate dashboard opens. The information displayed in the license widget of the dashboard depends on your license type.

    post_deployment_2
    Figure 7. The FortiGate dashboard

Other useful information

FortiGate EC2 Auto Scaling on AWS features

Major components

  • The BYOL EC2 Auto Scaling group: This group contains FortiGate instances of the BYOL licensing model. These instances dynamically scale out or scale in based on the scaling metrics specified by the parameters Scale-out threshold and Scale-in threshold. For each instance you must provide a valid license purchased from FortiCare. For BYOL-only and hybrid licensing deployments, the minimum group size (FgtAsgMinSizeByol) must be at least 2. These are the main instances and are fixed and running 24/7. If it is set to 1 and the instance fails to work, the current FortiGate configuration is lost.

  • The on-demand EC2 Auto Scaling group: This group contains FortiGate instances of the on-demand licensing model. These instances dynamically scale out or scale in based on the scaling metrics specified by the parameters Scale-out threshold and Scale-in threshold. For on-demand-only deployments, the minimum group size (FgtAsgMinSizePayg) must be at least 2. These are the main instances and are fixed and running 24/7. If it is set to 1 and the instance fails to work, the current FortiGate configuration is lost.

  • The assets/configset directory in the S3 bucket: This directory contains the following files that are loaded as the initial configuration for a new FortiGate instance.

    • baseconfig is the base configuration. This file can be modified as needed to meet your network requirements. Placeholders such as {SYNC_INTERFACE} are explained in the "Configset placeholders" table that follows.

    • httproutingpolicy and httpsroutingpolicy specify the FortiGate firewall policy for virtual IP addresses (VIPs) for http routing and https routing, respectively. They’re provided as part of the base configset for a common use case. This use case includes a VIP on port 80 and a VIP on port 443 with a policy that points to an internal load balancer. The port numbers are configurable and can be changed during CFT deployment. Additional VIPs can be added here as needed. Note that in FortiOS 6.2.3, any VIPs created on the main instance do not sync to the secondary units. Any VIP you wish to add must be added as part of the base configuration. If you set the InternalLoadBalancingOptions parameter to Do not need one, append your VIP configuration to baseconfig.

    • (Optional) The assets/fgt-asg-license directory in the S3 bucket contains BYOL license files.

  • The tables in DynamoDB: These tables are required to store information such as health-check monitoring, main-instance election, and state transitions. Do not modify these records unless required for troubleshooting purposes.

  • The networking components: These components include the Network Load Balancers, the target group, and the VPC and subnets. You are expected to create your own client and server instances that you want protected by the FortiGate.

Configset placeholders

When the FortiGate requests the configuration from the FortiGate EC2 Auto Scaling handler function, the placeholders in the following table are replaced with actual values for the Amazon EC2 Auto Scaling group.

Placeholder Type Description

{SYNC_INTERFACE}

Text

The interface for FortiGate instances to synchronize information. Specify as port1, port2, port3, etc. All characters must be lowercase.

{CALLBACK_URL}

URL

The endpoint URL to interact with the Amazon EC2 Auto Scaling handler script. Automatically generated during AWS CloudFormation deployment.

{PSK_SECRET}

Text

The preshared key used in FortiOS. Specified during AWS CloudFormation deployment.

{ADMIN_PORT}

Number

A port number specified for administrator login. A positive integer, such as 443. Specified during AWS CloudFormation deployment.

{HEART_BEAT_INTERVAL}

Number

The time interval (in seconds) that the FortiGate waits between sending heartbeat requests to the Amazon EC2 Auto Scaling handler function.

Amazon EC2 Auto Scaling handler environment variables

Variable name Description

UNIQUE_ID

Reserved, empty string.

CUSTOM_ID

Reserved, empty string.

RESOURCE_TAG_PREFIX

The value of the CFT parameter Resource tag prefix, which is described in the table Resource tagging configuration.

FAQ

Q. I encountered a CREATE_FAILED error when I launched the Quick Start.

A1. If AWS CloudFormation fails to create the stack, relaunch the template with Rollback on failure set to Disabled. (This setting is under Advanced in the AWS CloudFormation console, Configure stack options page.) With this setting, the stack’s state is retained and the instance is left running, so you can troubleshoot the issue. (For Windows, look at the log files in %ProgramFiles%\Amazon\EC2ConfigService and C:\cfn\log.)

When you set Rollback on failure to Disabled, you continue to incur AWS charges for this stack. Delete the stack when you finish troubleshooting.

For more information, see Troubleshooting AWS CloudFormation.

A2. The deployment will fail if you select an instance type that is not supported in the Region that was selected. Your desired instance type is available in your Region if it is listed on the instance-types page for your Region.

Q. I encountered a size limitation error when I deployed the AWS CloudFormation templates.

A. Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template size limitations. For more information, see AWS CloudFormation quotas.

Q. The FortiGate main-instance election was not successful.

A. Reset the main-instance election. To reset the main-instance election, navigate to the DynamoDB table <ResourceTagPrefix>-FortiGateMasterElection. Choose the Items tab, and delete the main record (the only item listed). A new main FortiGate instance is elected, and a new record is created. If the reset does not solve the problem, contact support.

Parameter reference

Unless you are customizing the Quick Start templates for your own deployment projects, we recommend that you keep the default settings for the parameters labeled Quick Start S3 bucket name, Quick Start S3 bucket Region, and Quick Start S3 key prefix. Changing these parameter settings automatically updates code references to point to a new Quick Start location. For more information, see the AWS Quick Start Contributor’s Guide.

Parameters for deploying into an existing VPC

Table 1. Resource-tagging configuration
Parameter label (name) Default value Description

Resource-tag prefix (ResourceTagPrefix)

Requires input

"ResourceGroup" tag key used on all resources and used as the prefix of all applicable resource names. It can contain only numbers, lowercase letters, uppercase letters, ampersand (@), hyphens (-), period (.), and hash (#). Maximum length is 50.

Resource-name prefix (CustomIdentifier)

fgtASG

Alternative prefix to be used on a resource name that "Resource-tag prefix" cannot apply to. It can contain only numbers, lowercase letters, and uppercase letters. Maximum length is 10.

Table 2. VPC network configuration
Parameter label (name) Default value Description

VPC ID (VPCID)

Requires input

ID of the existing VPC where Fortinet FortiGate EC2 Auto Scaling will be deployed. The VPC must have the option "DNS hostnames" enabled, and each of the two Availability Zones in the VPC must have at least 1 public subnet and at least 1 private subnet.

VPC CIDR (VPCCIDR)

Requires input

CIDR block of the selected existing VPC in which FortiGate Auto Scaling will be deployed. This can be found in parentheses in the VPC ID parameter selection.

Public subnet 1 ID (PublicSubnet1)

Requires input

ID of the public subnet 1 located in Availability Zone 1 of the selected existing VPC. The Fortinet FortiGate EC2 Auto Scaling instances will be deployed here.

Public subnet 2 ID (PublicSubnet2)

Requires input

ID of the public subnet 2 located in Availability Zone 2 of the selected existing VPC. The Fortinet FortiGate EC2 Auto Scaling instances will be deployed here.

Private subnet 1 ID (PrivateSubnet1)

Requires input

ID of the private subnet 1 located in Availability Zone 1 of the selected existing VPC. This subnet will be protected by the FortiGates in the public subnet of the same Availability Zone.

Private subnet 2 ID (PrivateSubnet2)

Requires input

ID of the private subnet 2 located in Availability Zone 2 of the selected existing VPC. This subnet will be protected by the FortiGates in the public subnet of the same Availability Zone.

Private subnet route table (PrivateSubnetRouteTable)

Requires input

ID of the route table associated with the two private subnets.

Integrated NAT Gateway (IntegratedNATGatewayOptions)

yes

Choose "no" if you do not want to set the main FortiGate in the Auto Scaling group as the NAT gateway for egress traffic from the protected private subnets.

Table 3. FortiGate configuration
Parameter label (name) Default value Description

Instance type (FortiGateInstanceType)

c5.xlarge

Instance type for the FortiGates in the Auto Scaling group. There are t2.small and compute-optimized instances, such as c4 and c5, available with different vCPU sizes and bandwidths. For more information about instance types, see https://aws.amazon.com/ec2/instance-types/.

FortiOS version (FortiOSVersion)

6.2.3

FortiOS version supported by Fortinet FortiGate EC2 Auto Scaling. IMPORTANT! Requires one or more subscriptions to Fortinet FortiGate on-demand or BYOL AMIs.

FortiGate PSK secret key (FortiGatePskSecret)

Requires input

Secret preshared key used by the FortiGate instances to securely communicate with each other. Must contain numbers and letters and may contain special characters. Maximum length is 128.

Admin port (FortiGateAdminPort)

8443

Port number for FortiGate administration. Minimum is 1. Maximum is 65535. Do not use the FortiGate reserved ports 443, 541, 514, or 703.

Admin CIDR block (FortiGateAdminCIDR)

Requires input

CIDR block for external administrator-management access. WARNING! 0.0.0.0/0 accepts connections from any IP address. Use a constrained CIDR range to reduce the potential of inbound attacks from unknown IP addresses.

Key-pair name (KeyPairName)

Requires input

Amazon EC2 key pair for administrator access.

Table 4. FortiGate EC2 Auto Scaling group configuration
Parameter label (name) Default value Description

Desired capacity (BYOL) (FgtAsgDesiredCapacityByol)

2

Number of FortiGate instances the BYOL Auto Scaling group should have at any time. For high availability in BYOL-only and hybrid use cases, make sure that at least 2 FortiGate instances are in the group. For specific use cases, set to 0 for on-demand-only, and >= 2 for BYOL-only or hybrid licensing.

Minimum group size (BYOL) (FgtAsgMinSizeByol)

2

Minimum number of FortiGate instances in the BYOL Auto Scaling group. For specific use cases, set to 0 for on-demand-only, and >= 2 for BYOL-only or hybrid licensing.

Maximum group size (BYOL) (FgtAsgMaxSizeByol)

2

Maximum number of FortiGate instances in the BYOL Auto Scaling group. For specific use cases, set to 0 for on-demand-only and >= 2 for BYOL-only or hybrid licensing. This number must be greater than or equal to the minimum group size (BYOL).

Desired capacity (on-demand) (FgtAsgDesiredCapacityPayg)

0

Number of FortiGate instances the on-demand Auto Scaling group should have at any time. For high availability in an on-demand-only use case, make sure that at least 2 FortiGate instances are in the group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing.

Minimum group size (on-demand) (FgtAsgMinSizePayg)

0

Minimum number of FortiGate instances in the on-demand Auto Scaling group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing.

Maximum group size (on-demand) (FgtAsgMaxSizePayg)

6

Maximum number of FortiGate instances in the on-demand Auto Scaling group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing. This number must be greater than or equal to the minimum group size (on-demand).

Scale-out threshold (FgtAsgScaleOutThreshold)

80

Threshold (in percentage) for the FortiGate Auto Scaling group to scale out (add) 1 instance. Minimum is 1. Maximum is 100.

Scale-in threshold (FgtAsgScaleInThreshold)

25

Threshold (in percentage) for the FortiGate Auto Scaling group to scale in (remove) 1 instance. Minimum is 1. Maximum is 100.

Primary election timeout (PrimaryElectionTimeout)

300

Maximum time (in seconds) to wait for the main election to complete. Minimum is 30. Maximum is 3600.

Get license grace period (GetLicenseGracePeriod)

600

Minimum time (in seconds) permitted before a distributed license can be revoked from a non-responsive FortiGate and re-distributed. Minimum is 300.

Health-check grace period (FgtAsgHealthCheckGracePeriod)

300

Length of time (in seconds) that Auto Scaling waits before checking an instance’s health status. Minimum is 60.

Scaling cooldown period (FgtAsgCooldown)

300

Auto Scaling group waits for the cooldown period (in seconds) to complete before resuming scaling activities. Minimum is 60. Maximum is 3600.

Instance lifecycle timeout (LifecycleHookTimeout)

480

Amount of time (in seconds) that can elapse before the FortiGate Auto Scaling lifecycle hook times out. Minimum is 60. Maximum is 3600.

Table 5. Load-balancing configuration
Parameter label (name) Default value Description

Traffic protocol (LoadBalancingTrafficProtocol)

HTTPS

Protocol used to load balance traffic.

Traffic port (LoadBalancingTrafficPort)

443

Port number used to balance web-service traffic if the internal web service load balancer is enabled. Minimum is 1. Maximum is 65535.

Health-check threshold (LoadBalancingHealthCheckThreshold)

3

Number of consecutive health-check failures required before considering a FortiGate instance unhealthy. Minimum is 3.

Internal load-balancing options (InternalLoadBalancingOptions)

add a new internal load balancer

(Optional) Predefined load balancer to route traffic to targets in the private subnets.

Health-check path (InternalTargetGroupHealthCheckPath)

/

(Optional) Destination path for health checks. This path must begin with a forward slash (/) and can be at most 1024 characters in length.

Internal load-balancer DNS name (InternalLoadBalancerDNSName)

Blank string

(Optional) DNS name of an existing internal load balancer used to route traffic from a FortiGate to targets in a specified target group. Leave it blank if you don’t use an existing load balancer.

Table 6. Failover management configuration
Parameter label (name) Default value Description

Heartbeat interval (HeartBeatInterval)

30

Length of time (in seconds) that a FortiGate instance waits between sending heartbeat requests to the FortiGate Auto Scaling handler. Minimum is 30. Maximum is 90.

Heartbeat loss count (HeartBeatLossCount)

3

Number of consecutively lost heartbeats. When this number has been reached, the FortiGate is deemed unhealthy, and failover activities commence.

Heartbeat delay allowance (HeartBeatDelayAllowance)

2

Maximum amount of time (in seconds) allowed for network latency of the FortiGate heartbeat arriving at the FortiGate Auto Scaling handler. Minimum is 0.

Table 7. FortiAnalyzer integration
Parameter label (name) Default value Description

FortiAnalyzer integration (FortiAnalyzerIntegrationOptions)

yes

Choose "no" if you do not want to incorporate FortiAnalyzer into Fortinet FortiGate EC2 Auto Scaling to use extended features that include storing logs into FortiAnalyzer.

FortiAnalyzer instance type (FortiAnalyzerInstanceType)

m5.large

Instance type to launch as FortiAnalyzer on-demand instances. There are compute-optimized instances, such as m4 and c4, available with different vCPU sizes and bandwidths. For more information about instance types, see https://aws.amazon.com/ec2/instance-types/.

FortiAnalyzer version (FortiAnalyzerVersion)

6.2.5

FortiAnalyzer version supported by Fortinet FortiGate EC2 Auto Scaling. IMPORTANT! Requires a subscription to the "Fortinet FortiAnalyzer Centralized Logging/Reporting (10 managed devices)" AMI.

FortiAnalyzer private IP address (FortiAnalyzerCustomPrivateIPAddress)

Blank string

Custom private IP address to be used by the FortiAnalyzer. Must be within the public subnet 1 CIDR range. Required if "FortiAnalyzer integration" is set to "yes." If "FortiAnalyzer integration" is set to "no," any input will be ignored.

Autoscale admin user name (FortiAnalyzerAutoscaleAdminUsername)

Blank string

Name of the secondary administrator-level account in the FortiAnalyzer, which Fortinet FortiGate EC2 Auto Scaling uses to connect to the FortiAnalyzer to authorize any FortiGate device in the Auto Scaling group. To conform to the FortiAnalyzer naming policy, the user name can only contain numbers, lowercase letters, uppercase letters, and hyphens. It cannot start or end with a hyphen (-).

Autoscale admin password (FortiAnalyzerAutoscaleAdminPassword)

Blank string

Password for the "Autoscale admin user name." The password must conform to the FortiAnalyzer password policy and have a minimum length of 8 and a maximum length of 128. If you need to enable KMS encryption, refer to the documentation.

Table 8. AWS Quick Start configuration
Parameter label (name) Default value Description

Quick Start S3 bucket name (QSS3BucketName)

aws-quickstart

S3 bucket that you created for your copy of Quick Start assets. Use this if you decide to customize the Quick Start. This bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). Unless you are customizing the template, keep the default setting. Changing this setting updates code references to point to a new Quick Start location. See https://aws-quickstart.github.io/option1.html.

Quick Start S3 key prefix (QSS3KeyPrefix)

quickstart-fortinet-fortigate/

S3 key prefix that is used to simulate a directory for your copy of Quick Start assets. Use this if you decide to customize the Quick Start. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html. Unless you are customizing the template, keep the default setting. Changing this setting updates code references to point to a new Quick Start location. See https://aws-quickstart.github.io/option1.html.

Parameters for deploying into a new VPC

Table 9. Resource-tagging configuration
Parameter label (name) Default value Description

Resource-tag prefix (ResourceTagPrefix)

Requires input

"ResourceGroup" tag key used on all resources and used as the prefix of all applicable resource names. It can contain only numbers, lowercase letters, uppercase letters, ampersand (@), hyphens (-), period (.), and hash (#). Maximum length is 50.

Resource-name prefix (CustomIdentifier)

fgtASG

Alternative prefix to be used on a resource name that "Resource-tag prefix" cannot apply to. It can only contain numbers, lowercase letters, and uppercase letters. Maximum length is 10.

Table 10. VPC network configuration
Parameter label (name) Default value Description

Availability Zones (AvailabilityZones)

Requires input

List of Availability Zones to use for the subnets in the VPC. The Quick Start uses two Availability Zones from your list and preserves the logical order you specify.

VPC CIDR (VPCCIDR)

192.168.0.0/16

CIDR block for the FortiGate EC2 Auto Scaling VPC.

Public subnet 1 CIDR (PublicSubnet1CIDR)

192.168.0.0/24

CIDR block for the public subnet located in Availability Zone 1 where the Fortinet FortiGate EC2 Auto Scaling instances will be deployed to.

Public subnet 2 CIDR (PublicSubnet2CIDR)

192.168.1.0/24

CIDR block for the public subnet located in Availability Zone 2 where the Fortinet FortiGate EC2 Auto Scaling instances will be deployed to.

Private subnet 1 CIDR (PrivateSubnet1CIDR)

192.168.2.0/24

CIDR block for the private subnet located in Availability Zone 1 where it is protected by the FortiGates in the public subnet of the same Availability Zone.

Private subnet 2 CIDR (PrivateSubnet2CIDR)

192.168.3.0/24

CIDR block for the private subnet located in Availability Zone 2 where it is protected by the FortiGates in the public subnet of the same Availability Zone.

Integrated NAT Gateway (IntegratedNATGatewayOptions)

yes

Choose "no" if you do not want to set the main FortiGate in the Auto Scaling group as the NAT gateway for egress traffic from the protected private subnets.

Table 11. FortiGate configuration
Parameter label (name) Default value Description

Instance type (FortiGateInstanceType)

c5.xlarge

Instance type for the FortiGates in the Auto Scaling group. There are t2.small and compute-optimized instances, such as c4 and c5, available with different vCPU sizes and bandwidths. For more information about instance types, see https://aws.amazon.com/ec2/instance-types/.

FortiOS version (FortiOSVersion)

6.2.3

FortiOS version supported by Fortinet FortiGate EC2 Auto Scaling. IMPORTANT! Requires one or more subscriptions to Fortinet FortiGate on-demand or BYOL AMIs.

FortiGate PSK secret key (FortiGatePskSecret)

Requires input

Secret preshared key used by the FortiGate instances to securely communicate with each other. Must contain numbers and letters and may contain special characters. Maximum length is 128.

Admin port (FortiGateAdminPort)

8443

Port number for FortiGate administration. Minimum is 1. Maximum is 65535. Do not use the FortiGate reserved ports 443, 541, 514, or 703.

Admin CIDR block (FortiGateAdminCIDR)

Requires input

CIDR block for external administrator-management access. WARNING! 0.0.0.0/0 accepts connections from any IP address. Use a constrained CIDR range to reduce the potential of inbound attacks from unknown IP addresses.

Key-pair name (KeyPairName)

Requires input

Amazon EC2 key pair for administrator access.

Table 12. FortiGate EC2 Auto Scaling group configuration
Parameter label (name) Default value Description

Desired capacity (BYOL) (FgtAsgDesiredCapacityByol)

2

Number of FortiGate instances the BYOL Auto Scaling group should have at any time. For high availability in BYOL-only and hybrid use cases, ensure at least 2 FortiGate instances are in the group. For specific use cases, set to 0 for on-demand-only, and >= 2 for BYOL-only or hybrid licensing.

Minimum group size (BYOL) (FgtAsgMinSizeByol)

2

Minimum number of FortiGate instances in the BYOL Auto Scaling group. For specific use cases, set to 0 for on-demand-only, and >= 2 for BYOL-only or hybrid licensing.

Maximum group size (BYOL) (FgtAsgMaxSizeByol)

2

Maximum number of FortiGate instances in the BYOL Auto Scaling group. For specific use cases, set to 0 for on-demand-only and >= 2 for BYOL-only or hybrid licensing. This number must be greater than or equal to the minimum group size (BYOL).

Desired capacity (on-demand) (FgtAsgDesiredCapacityPayg)

0

Number of FortiGate instances the on-demand Auto Scaling group should have at any time. For high availability in an on-demand-only use case, make sure that at least 2 FortiGate instances are in the group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing.

Minimum group size (on-demand) (FgtAsgMinSizePayg)

0

Minimum number of FortiGate instances in the on-demand Auto Scaling group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing.

Maximum group size (on-demand) (FgtAsgMaxSizePayg)

6

Maximum number of FortiGate instances in the on-demand Auto Scaling group. For specific use cases, set to 0 for BYOL-only, >= 2 for on-demand-only, and >= 0 for hybrid licensing. This number must be greater than or equal to the minimum group size (on-demand).

Scale-out threshold (FgtAsgScaleOutThreshold)

80

Threshold (in percentage) for the FortiGate Auto Scaling group to scale out (add) 1 instance. Minimum is 1. Maximum is 100.

Scale-in threshold (FgtAsgScaleInThreshold)

25

Threshold (in percentage) for the FortiGate Auto Scaling group to scale in (remove) 1 instance. Minimum is 1. Maximum is 100.

Primary election timeout (PrimaryElectionTimeout)

300

Maximum time (in seconds) to wait for the main election to complete. Minimum is 30. Maximum is 3600.

Get license grace period (GetLicenseGracePeriod)

600

Minimum time (in seconds) permitted before a distributed license can be revoked from a non-responsive FortiGate and re-distributed. Minimum is 300.

Health-check grace period (FgtAsgHealthCheckGracePeriod)

300

Length of time (in seconds) that Auto Scaling waits before checking an instance’s health status. Minimum is 60.

Scaling cooldown period (FgtAsgCooldown)

300

Auto Scaling group waits for the cooldown period (in seconds) to complete before resuming scaling activities. Minimum is 60. Maximum is 3600.

Instance lifecycle timeout (LifecycleHookTimeout)

480

Amount of time (in seconds) that can elapse before the FortiGate Auto Scaling lifecycle hook times out. Minimum is 60. Maximum is 3600.

Table 13. Load-balancing configuration
Parameter label (name) Default value Description

Traffic protocol (LoadBalancingTrafficProtocol)

HTTPS

Protocol used to load balance traffic.

Traffic port (LoadBalancingTrafficPort)

443

Port number used to balance web service traffic if the internal web service load balancer is enabled. Minimum is 1. Maximum is 65535.

Health-check threshold (LoadBalancingHealthCheckThreshold)

3

Number of consecutive health-check failures required before considering a FortiGate instance unhealthy. Minimum is 3.

Internal load-balancing options (InternalLoadBalancingOptions)

add a new internal load balancer

(Optional) Predefined load balancer to route traffic to targets in the private subnets.

Health-check path (InternalTargetGroupHealthCheckPath)

/

(Optional) Destination path for health checks. This path must begin with a forward slash (/) and can be at most 1024 characters in length.

Internal load-balancer DNS name (InternalLoadBalancerDNSName)

Blank string

(Optional) DNS name of an existing internal load balancer used to route traffic from a FortiGate to targets in a specified target group. Leave it blank if you don’t use an existing load balancer.

Table 14. Failover management configuration
Parameter label (name) Default value Description

Heartbeat interval (HeartBeatInterval)

30

Length of time (in seconds) that a FortiGate instance waits between sending heartbeat requests to the FortiGate Auto Scaling handler. Minimum is 30. Maximum is 90.

Heartbeat loss count (HeartBeatLossCount)

3

Number of consecutively lost heartbeats. When this number has been reached, the FortiGate is deemed unhealthy, and failover activities commence.

Heartbeat delay allowance (HeartBeatDelayAllowance)

2

Maximum amount of time (in seconds) allowed for network latency of the FortiGate heartbeat arriving at the FortiGate Auto Scaling handler. Minimum is 0.

Table 15. FortiAnalyzer integration
Parameter label (name) Default value Description

FortiAnalyzer integration (FortiAnalyzerIntegrationOptions)

yes

Choose "no" if you do not want to incorporate FortiAnalyzer into Fortinet FortiGate EC2 Auto Scaling to use extended features that include storing logs into FortiAnalyzer.

FortiAnalyzer instance type (FortiAnalyzerInstanceType)

m5.large

Instance type to launch as FortiAnalyzer on-demand instances. There are t2.small and compute-optimized instances, such as m4 and c4, available with different vCPU sizes and bandwidths. For more information about instance types, see https://aws.amazon.com/ec2/instance-types/

FortiAnalyzer version (FortiAnalyzerVersion)

6.2.5

FortiAnalyzer version supported by Fortinet FortiGate EC2 Auto Scaling. IMPORTANT! Requires a subscription to the "Fortinet FortiAnalyzer Centralized Logging/Reporting (10 managed devices)" AMI.

FortiAnalyzer private IP address (FortiAnalyzerCustomPrivateIPAddress)

Blank string

Custom private IP address to be used by the FortiAnalyzer. Must be within the public subnet 1 CIDR range. Required if "FortiAnalyzer integration" is set to "yes." If "FortiAnalyzer integration" is set to "no," any input will be ignored.

Autoscale admin user name (FortiAnalyzerAutoscaleAdminUsername)

Blank string

Name of the secondary administrator-level account in the FortiAnalyzer, which Fortinet FortiGate EC2 Auto Scaling uses to connect to the FortiAnalyzer to authorize any FortiGate device in the Auto Scaling group. To conform to the FortiAnalyzer naming policy, the user name can only contain numbers, lowercase letters, uppercase letters, and hyphens. It cannot start or end with a hyphen (-).

Autoscale admin password (FortiAnalyzerAutoscaleAdminPassword)

Blank string

Password for the "Autoscale admin user name." The password must conform to the FortiAnalyzer password policy and have a minimum length of 8 and a maximum length of 128. If you need to enable KMS encryption, refer to the documentation.

Table 16. AWS Quick Start configuration
Parameter label (name) Default value Description

Quick Start S3 bucket name (QSS3BucketName)

aws-quickstart

S3 bucket that you created for your copy of Quick Start assets. Use this if you decide to customize the Quick Start. This bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). Unless you are customizing the template, keep the default setting. Changing this setting updates code references to point to a new Quick Start location. See https://aws-quickstart.github.io/option1.html.

Quick Start S3 key prefix (QSS3KeyPrefix)

quickstart-fortinet-fortigate/

S3 key prefix that is used to simulate a directory for your copy of Quick Start assets. Use this if you decide to customize the Quick Start. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html. Unless you are customizing the template, keep the default setting. Changing this setting updates code references to point to a new Quick Start location. See https://aws-quickstart.github.io/option1.html.

Send us feedback

To post feedback, submit feature ideas, or report bugs, use the Issues section of the GitHub repository for this Quick Start. To submit code, see the Quick Start Contributor’s Guide.

Quick Start reference deployments

GitHub repository

Visit our GitHub repository to download the templates and scripts for this Quick Start, to post your comments, and to share your customizations with others.


Notices

This document is provided for informational purposes only. It represents AWS’s current product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the License for specific language governing permissions and limitations.