Script output images: color phase products for each swath F1, F2, F3. Contains modified Copernicus Sentinel data (2015) processed by ESA.

How to Configure AWS for Running the GMT5SAR InSAR Recipe

Script output images: color phase products for each swath F1, F2, F3. Contains modified Copernicus Sentinel data (2015) processed by ESA.

Adapted from instructions prepared by C. Stoner, ASF

Easy (AWS sign-up and configuration)


After logging-in the user must make some choices before creating their InSAR products. These steps guide you through that process, with recommended settings.


Start an EC2 Instance

    1. Sign in to your AWS account, or create one now.
AWS Management Console
    1. In AWS Services, under Compute, click on EC2.
Navigate to EC2

Select an Amazon Machine Image (AMI) — i.e., the software package you want

    1. At the right on the top menu bar, set the Region to US East (N. Virginia) by selecting from the drop-down menu. 
    2. Under Create Instance, click on the Launch Instance button.
Select the Region and Launch Instance
    1. Choose an Amazon Machine Instance (AMI) — Step 1
      • (1) Under Quick Start, click on Community AMIs.
      • (2) In the Search community AMIs box, type “asf-insar-gmt5sar” and press Enter.
      • (3) Click the Select button next to ASF-INSAR-GMT5SAR
Search Community AMIs for asf-insar-gmt5sar

Configure the EC2 Resources

    1. Choose an Instance Type — Step 2
      • Scroll down the table of available instances and choose: m4.xlarge.
        • Then click on the Next: Configure Instance Details button.
    2. Configure Instance Details — Step 3
      • Nothing needs to be changed here, so click on the Next: Add Storage button.
Choose Instance Type m4.xlarge
View Instance Details
    1. Add Storage — Step 4
      • The volume storage size is preset, so confirm that the Size (GiB) value is 230 and then click on the Next: Add Tags button.
Set Size value, then click Next: Add Tags
    1. Add Tags — Step 5
      • (1) Click on the Add Tag button.
      • (2) Under Key, type “Name.”
      • (3) Under Value, type a description; for example, “asf-insar-tutorial.”
      • Click on the Next: Configure Security Group button.
Click Add Tag
Enter text for the Key and Value entries
    1. Configure Security Group — Step 6
      • This step allows you to set access permissions for your instance. We will create a setting so that only your computer can access your instance.
      • In the Security group name box, type a name.
      • Under Source, click on Custom and select and click on My IP.
      • The IP address of your computer is automatically selected.
      • Click on the Review and Launch button.
Enter a Security group name and choose a Source
Select My IP as a Source
    1. Review Instance Launch — Step 7
      • This last step allows you to review the details of your configuration before activating your new instance.
        • A warning is displayed at the top of the screen that can be ignored. The “free usage tier” AMIs offered in AWS are not powerful enough to process the GMT5SAR InSAR recipe.
      • Click on the Launch button.
Review the details of your configuration

Create a Key Pair (.pem file)

    1. Create a key pair for authentication and encryption when connecting to your running EC2 Instance. Read more on information about key pairs.
      • Click on Choose an existing key pair and select Create a new key pair.
      • Name the key pair; for example, asf_tutorial_keypair.
      • Click on the Download Key Pair button.

Note: The key pair file will download to your default Download directory as filename.pem and can be moved to a directory of your choice. The .pem file is required to connect to your EC2 Instance and to transfer data between your computer and your EC2 Instance.

Select Create a new key pair
Download your Key Pair

Launch the Instance

    1. After creating the key pair, click on the Launch Instances button.
    2. The Launch Status window provides information on your new EC2 Instance. To view your instance, scroll to the bottom of the page and click on the View Instances button.
View Launch Status
View your EC2 Instance's details

Terminate the Instance

Important: Do not terminate your EC2 Instance until you have finished processing and moved any files you want to save from your instance to your computer. To connect to your EC2 Instance and move files in or out, refer to the ASF Data Recipes: How to Connect to an AWS EC2 Instance — OS X and How to Connect to an AWS EC2 Instance using PuTTY v1.1 (Windows)

    1. Once you have launched your instance, you will start incurring charges on your account.
    2. When you have finished processing, you need to terminate the EC2 instance to avoid incurring additional charges.
      • From the EC2 Dashboard, navigate to Actions > Instance State.
        • Click on Terminate and confirm.
        • This deletes the instance and all data stored on the instance; a new AMI will need to be configured for any future processing.

Important: Selecting Stop will shut the instance down and stop further EC2 charges from accruing. But you will continue to be charged for the data left in the instance EBS storage volume (e.g., the GMT5SAR script, granule files, PRODUCT files, etc.) The advantage of this option is that you can restart the instance and avoid configuring a new one for additional processing. 

Note: Each time an instance is started, a minimum one minute is charged. After one minute, you are charged by the seconds used.

Navigate to terminate the EC2 Instance

How to Create a Billing Alarm


A Billing Alarm will notify you by email when your AWS account charges for the month have exceeded a monetary amount you have set. This is an extremely useful tool to stay on-budget. It can also be a way to let you know if you have forgotten to stop or terminate an AWS service — such as an EC2 instance — and help avoid unexpected charges.


You must have an AWS account. If you don’t have an account, create one now.

Note: You will need to provide credit card information for your new account.

Enable Billing Alerts for Your Account

Note: Billing Alerts must be enabled on your account before you can create a Billing Alarm.

Navigate to select the U.S. East (N. Virginia) region.
    1. Sign in to your AWS account.
      • Make sure the region is set to U.S. East (N. Virginia). This is the region where AWS stores billing information.
    2. Click on your account name in the upper-right corner.
      • In the dropdown menu, select My Billing Dashboard to open the Billing & Cost Management Dashboard.
    3. In the left Dashboard menu, click on Preferences.
    4. Check the box in front of Receive Billing Alerts and then click Save Preferences.

Note: If you are eligible, make sure the Receive Free Tier Usage Alerts box is checked as well.

Navigate to "My Billing Dashboard."
Navigate to Preferences from the Dashboard menu.
Select Receive Billing Alerts

Create a Billing Alarm using the CloudWatch Console

    1. Click on the AWS logo in the upper left of the Billing & Cost Management Dashboard screen to open the AWS Management Console.
    2. Type “cloudwatch” in the AWS Management Console search box and then click on CloudWatch.
    3. In the CloudWatch console menu on the left under Alarms, click on Billing.
    4. In the Billing Alarms window, click the Create Alarm button.
    5. Scroll to the bottom of the Create new alarm page and click on show advanced (1).
    6. Alarm details
      1. Add a Name for your new alarm and a Description (optional).
      2. Under Whenever charges for: set is: to >= and USD $ to the amount in dollars you want to set as a limit (2).

Note: You will receive an email notification when your account charges have reached or exceeded this amount.

    1. Additional settings
      1. Under Treat missing data as: choose ignore (maintain the alarm state) (3).
    2. Actions
      1. Under Email list: enter your email address (4).
      2. Leave the other settings unchanged.
    3. Click on the Create Alarm button at the bottom of the Create new alarm page.

Important: You will be sent an email to confirm the email address set in your alarm. Open the email and click on the “Confirm subscription” link to enable notifications.

Create Alarm
Search for CloudWatch.
Navigate to Billing from the CloudWatch console menu.
The Billing Alarms window.
The Create new alarm page.
Alarm details, Additional settings, and Actions.

Monitor a Billing Alarm status

    1. When you create a new alarm, an alarm status window will open. The State will initially show INSUFFICIENT_DATA but will update to OK in a minute or so.

Note: If the State shows PENDING_CONFIRMATION, open the confirmation email that was mailed to you and click on “Confirm subscription.”

    1. To see details of your alarm, check the box in front of the alarm description.
    2. When the monetary limit set for your alarm has been exceeded, the State will change to ALARM, the graph border will be red, and an email will be sent to you notifying you of this.
    3. You can check the status of an alarm at any time by opening the CloudWatch console.
      1. Make sure the region is set to U.S. East (N. Virginia).
      2. In the left menu, under Alarms, click Billing, then check the box in front of an alarm to see its details.
View alarm details.
View alarm notification.

Delete a Billing Alarm

    1. Open the CloudWatch console.
      1. Make sure the region is set to U.S. East (N. Virginia).
      2. In the left menu, under Alarms, click Billing, then check the box in front of an alarm to see its details.
      3. At the top, click on the Action tab and select Delete.
      4. When prompted, confirm “Yes, Delete.”

Note: To make changes to the settings for your alarm — e.g., set a new billing threshold — select Modify under the Actions tab.

Deleting a Billing Alarm.