There are multiple ways to automate Amazon Web Services CloudFormation stack creation. This topic describes how to use an Amazon Web Services (AWS) SDK for Python and provides sample scripts. You might use these scripts if you want to automate from a Linux machine and, therefore, cannot use ArcGIS Enterprise Cloud Builder Command Line Interface for Amazon Web Services, which is currently supported only on Microsoft Windows.
See Tools for Amazon Web Services in the AWS help for information on other automation options.
Follow these steps to download and use sample Python scripts with CloudFormation templates to deploy ArcGIS Enterprise or ArcGIS Server sites.
- Make sure you have Python installed on the machine where you will run the Python script. The minimum supported Python version is 2.6.
Tip:
Supported Python versions are installed with ArcGIS Server and ArcGIS Desktop.
- Download and install AWS SDK for Python on the same machine where you installed Python.
- Download the 10.8 sample Python script and parameters files or 10.8.1 sample Python script and parameters files.
- Edit the parameters file for the CloudFormation template you want to use with the Python script so the parameter file includes the settings you need.
For example, to create a single-machine base ArcGIS Enterprise deployment on a Windows machine on AWS, open the cf_parameters_win_allinone_webgisstack.json parameters file in a text editor and update the parameter values to reflect what you need for your deployment.
- Save and close the parameters file.
- Open a Command window or Python client and change directories to the one that contains the Python script and updated parameters file.
- Run the Python script.
For example, to run the sample script with the arcgis-allinone-windows template, type python cloudformation_stack_creation_<version>.py <AWS_Access_Key> <AWS_Secret_Access_Key> cf_parameters_win_allinone_webgisstack.json, but replace the following with the information specific to your deployment:
- <version>—The software version in the script name
- <AWS_Access_Key_ID>—The Access Key ID for your AWS account.
- <AWS_Secret_Access_Key>—The Secret Access Key for your AWS account
As the script runs, progress status displays in the Python client window.