

AWS Mainframe Modernization Service (Managed Runtime Environment experience) is no longer open to new customers. For capabilities similar to AWS Mainframe Modernization Service (Managed Runtime Environment experience) explore AWS Mainframe Modernization Service (Self-Managed Experience). Existing customers can continue to use the service as normal. For more information, see [AWS Mainframe Modernization availability change](https://docs.aws.amazon.com/m2/latest/userguide/mainframe-modernization-availability-change.html).

# Set up AWS Transform for mainframe Runtime
<a name="ba-runtime-setup"></a>

This section explains the steps to set up AWS Transform for mainframe Runtime on your AWS infrastructure. Before you set up your AWS Transform for mainframe Runtime for applications, understand the prerequisites, regions and buckets, and the CloudWatch alarm setup to configure and manager your runtime environment.

**Topics**
+ [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md)
+ [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md)
+ [Infrastructure setup requirements for AWS Transform for mainframe Runtime](ba-infrastructure-setup.md)
+ [AWS Transform for mainframe Runtime artifacts](ba-runtime-artifacts.md)
+ [Deploy AWS Transform for mainframe Runtime on Amazon EC2](ba-deploy-ec2.md)
+ [Deploy AWS Transform for mainframe Runtime on containers on Amazon ECS and Amazon EKS](ba-deploy-container.md)
+ [Test the PlanetsDemo application](ba-runtime-test-planetsdemo.md)

# AWS Transform for mainframe Runtime prerequisites
<a name="ba-runtime-setup-prereq"></a>

AWS Transform for mainframe Runtime is available in several [AWS Transform for mainframe release notes](ba-release-notes.md) release versions. If you have ongoing modernization projects, you might need incremental versions of the runtime for implementation and testing purposes. To define your needs, contact your AWS Transform for mainframe delivery manager.

Before you begin to use the AWS Transform for mainframe Runtime, do the following:
+ Make sure that you have an AWS account.
+ Make sure that you have a modernized application refactored with AWS Transform for mainframe.
+ Choose an AWS Region and one of the compute options that are supported for AWS Transform for mainframe Runtime.
+ Choose the AWS Transform for mainframe Runtime version that you want to use.
+ Review [Infrastructure setup requirements for AWS Transform for mainframe Runtime](ba-infrastructure-setup.md) and validate the additional components required to run the AWS Transform for mainframe Runtime.

**Note**  
If you want to test the features of AWS Transform for mainframe Runtime , you can use the demo application `Planets Demo`, which you can download from [PlanetsDemo-v1.zip](https://d3lkpej5ajcpac.cloudfront.net/demo/bluage/PlanetsDemo-v1.zip).

# Onboarding AWS Transform for mainframe Runtime
<a name="ba-runtime-setup-onboard"></a>

**Note**  
The AWS Transform for mainframe Runtime access has transitioned from ticket-based requests to direct download through [AWS Transform for mainframe refactor](https://bluinsights.aws/). We have introduced a new and simplified way to access AWS Transform for mainframe products through the [AWS Transform for mainframe Toolbox](https://bluinsights.aws/docs/bluage-toolbox-introduction) feature in AWS Transform for mainframe refactor.

To get started, create an [AWS Support](https://support.console.aws.amazon.com/support/home) case to request onboarding to access AWS Transform for mainframe Runtime. Include in your request your AWS account ID, the AWS Region that you want to use, and a compute choice, and AWS Transform for mainframe Runtime version. If you aren't sure which version you need, contact your AWS Transform for mainframe delivery manager. If you already have code source of application generated by AWS Mainframe Modernization Refactoring tools, note the `gapwalk.version` tag value into `pom.xml` file within your modernized code base.

**Note**  
The AWS Transform for mainframe Runtime is available in two main varieties: Alpha pre-releases and Releases. To determine which release to use, see [AWS Transform for mainframe versioning](ba-versioning.md), or contact your AWS Transform for mainframe delivery manager.

## Regions and buckets for AWS Transform for mainframe Runtime
<a name="ba-runtime-setup-buckets"></a>

We store the AWS Transform for mainframe Runtime artifacts in different Amazon S3 buckets by Region and by compute choice. To access the bucket for your AWS Region for AWS Transform for mainframe Runtime, use the name listed in the following table.


| AWS Region | Release bucket | Alpha pre-release bucket | 
| --- | --- | --- | 
|  US East (Ohio)  |  aws-bluage-runtime-artifacts-055777665268-us-east-2  | aws-bluage-runtime-artifacts-dev-055777665268-us-east-2 | 
|  US East (N. Virginia)  |  aws-bluage-runtime-artifacts-139023371234-us-east-1  | aws-bluage-runtime-artifacts-dev-139023371234-us-east-1 | 
|  US West (N. California)  |  aws-bluage-runtime-artifacts-788454048782-us-west-1  | aws-bluage-runtime-artifacts-dev-788454048782-us-west-1 | 
|  US West (Oregon)  |  aws-bluage-runtime-artifacts-836771190483-us-west-2  | aws-bluage-runtime-artifacts-dev-836771190483-us-west-2 | 
|  Canada (Central)  |  aws-bluage-runtime-artifacts-637423580979-ca-central-1  |  aws-bluage-runtime-artifacts-dev-637423580979-ca-central-1  | 
|  Europe (Ireland)  |  aws-bluage-runtime-artifacts-925278190477-eu-west-1  | aws-bluage-runtime-artifacts-dev-925278190477-eu-west-1 | 
|  Europe (London)  |  aws-bluage-runtime-artifacts-767397831990-eu-west-1  |  aws-bluage-runtime-artifacts-dev-767397831990-eu-west-1  | 
|  Europe (Paris)  |  aws-bluage-runtime-artifacts-673009995881-eu-west-3  | aws-bluage-runtime-artifacts-dev-673009995881-eu-west-3 | 
|  Europe (Frankfurt)  |  aws-bluage-runtime-artifacts-485196800481-eu-central-1  | aws-bluage-runtime-artifacts-dev-485196800481-eu-central-1 | 
|  Europe (Stockholm)  |  aws-bluage-runtime-artifacts-654654484534-eu-north-1  |  aws-bluage-runtime-artifacts-dev-654654484534-eu-north-1  | 
|  Europe (Milan)  |  aws-bluage-runtime-artifacts-654654328338-eu-south-1  |  aws-bluage-runtime-artifacts-dev-654654328338-eu-south-1  | 
|  Europe (Spain)  |  aws-bluage-runtime-artifacts-905417994954-eu-south-2  |  aws-bluage-runtime-artifacts-dev-905417994954-eu-south-2  | 
|  South America (São Paulo)  |  aws-bluage-runtime-artifacts-737536804457-sa-east-1  | aws-bluage-runtime-artifacts-dev-737536804457-sa-east-1 | 
|  Asia Pacific (Tokyo)  |  aws-bluage-runtime-artifacts-445578176276-ap-northeast-1  | aws-bluage-runtime-artifacts-dev-445578176276-ap-northeast-1 | 
|  Asia Pacific (Seoul)  |  aws-bluage-runtime-artifacts-381492221498-ap-northeast-2  |  aws-bluage-runtime-artifacts-dev-381492221498-ap-northeast-2  | 
|  Asia Pacific (Osaka)  |  aws-bluage-runtime-artifacts-905418229615-ap-northeast-3  |  aws-bluage-runtime-artifacts-dev-905418229615-ap-northeast-3  | 
|  Asia Pacific (Singapore)  |  aws-bluage-runtime-artifacts-767397774613-ap-southeast-1  |  aws-bluage-runtime-artifacts-dev-767397774613-ap-southeast-1  | 
|  Asia Pacific (Sydney)  |  aws-bluage-runtime-artifacts-726160321909-ap-southeast-2  | aws-bluage-runtime-artifacts-dev-726160321909-ap-southeast-2 | 
|  Asia Pacific (Mumbai)  |  aws-bluage-runtime-artifacts-905418353577-ap-south-1  |  aws-bluage-runtime-artifacts-dev-905418353577-ap-south-1  | 
|  Africa (Cape Town)  |  aws-bluage-runtime-artifacts-992382777663-af-south-1  |  aws-bluage-runtime-artifacts-dev-992382777663-af-south-1  | 
|  Israel (Tel Aviv)  |  aws-bluage-runtime-artifacts-471112516508-il-central-1  |  aws-bluage-runtime-artifacts-dev-471112516508-il-central-1  | 

## Using the AWS CLI to list the contents of the bucket
<a name="ba-runtime-setup-cmds"></a>

After you are onboarded, you can list the contents of the bucket by running the following AWS CLI command in a terminal.

`aws s3 ls bucket-name `

Replace `bucket-name` with the name of the bucket for your AWS Region from the previous table.

This command returns a list of folders that correspond to different versions of the AWS Transform for mainframe Runtime runtime, such as the following for a Release bucket:

```
PRE 4.0.0/
PRE 4.10.0/
```

Or the following for a build bucket:

```
PRE 4.11.0/
PRE 4.13.0/
```

We recommend that you use the latest version available. If that isn't possible, then use the runtime version that was validated during the application refactoring phase. To list the available frameworks for a specific version, run the following command:

`aws s3 ls s3://bucket-name/version/Framework/`

Replace `bucket-name` with the name of the bucket for your AWS Region and `version` with the version you want. The following are two examples.

For a release bucket:

`aws s3 ls s3://aws-bluage-runtime-artifacts-139023371234-us-east-1/4.10.0/Framework/`

The command returns a list of zip files, such as:

```
2025-04-08 16:11:19  152040176 aws-bluage-runtime-4.10.0.zip
2025-04-08 16:11:52  176518889 aws-bluage-webapps-4.10.0.zip
```

For a Alpha pre-release bucket:

`aws s3 ls s3://aws-bluage-runtime-artifacts-dev-139023371234-us-east-1/4.11.0/Framework/`

The command returns a list of zip files, such as:

```
2025-04-09 20:23:34  152304534 aws-bluage-runtime-4.11.0.zip
2025-04-09 20:24:07  176262381 aws-bluage-webapps-4.11.0.zip
```

## Download the framework
<a name="ba-runtime-setup-download"></a>

You can download the framework for example to upgrade the AWS Transform for mainframe Runtime version on an existing Amazon EC2 instance.

`aws s3 cp s3://bucket-name/version/Framework/ folder-of-your-choice --recursive `

Where:

folder-of-your-choice  
folder path where you'd like to download the framework.

For example: `aws s3 cp s3://aws-bluage-runtime-artifacts-139023371234-us-east-1/4.0.0/Framework/ . --recursive`

This command produces the following output:

```
download: s3://aws-bluage-runtime-artifacts-139023371234-us-east-1/4.0.0/Framework/aws-bluage-webapps-4.0.0.zip to ./aws-bluage-webapps-4.0.0.zip
download: s3://aws-bluage-runtime-artifacts-139023371234-us-east-1/4.0.0/Framework/aws-bluage-runtime-4.0.0.zip to ./aws-bluage-runtime-4.0.0.zip
```

You can list the framework files as follows:

`ls -l`

This command produces the following output:

```
total 230928
-rw-rw-r-- 1 cloudshell-user cloudshell-user 152040176 Apr  8 16:11 aws-bluage-runtime-4.0.0.zip
-rw-rw-r-- 1 cloudshell-user cloudshell-user 176518889 Apr  8 16:11 aws-bluage-webapps-4.0.0.zip
```

**Note**  
Access to artifacts may be temporarily interrupted, and versions may be removed for security reasons. We strongly recommend that you store the artifacts you use in your own account. The local version should be used for reference in your internal architectures.

# Infrastructure setup requirements for AWS Transform for mainframe Runtime
<a name="ba-infrastructure-setup"></a>

This topic describes the minimum infrastructure configuration required to run AWS Transform for mainframe Runtime. The following procedures describe how to set up AWS Transform for mainframe Runtime on your compute of choice to deploy a modernized application on the AWS Transform for mainframe Runtime. The resources that you create must be in an Amazon VPC that has a subnet that is dedicated to your application domain.

**Topics**
+ [Infrastructure requirements](#infrastructure-requirements)
+ [Running AWS Transform for mainframe Runtime on Amazon EC2](#ba-running-on-ec2)
+ [Running AWS Transform for mainframe Runtime on Amazon ECS on Amazon EC2](#ba-running-on-ecs-on-ec2)
+ [Running AWS Transform for mainframe Runtime on Amazon EKS on Amazon EC2](#ba-running-on-eks-on-ec2)
+ [Running AWS Transform for mainframe Runtime on Amazon ECS managed by AWS Fargate](#ba-running-on-fargate)

## Infrastructure requirements
<a name="infrastructure-requirements"></a>

**Create a security group**

If you plan to work on Amazon EC2 instances on Amazon EKS, skip this procedure because the Amazon EKS cluster creation process creates a security group on your behalf. Use that security group in the following procedures instead of creating a new one.

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. In the left navigation pane, under **Security**, choose **Security groups**.

1. In the central pane, choose **Create security group**.

1. In the **Security group name** field, enter **M2BluagePrivateLink-SG**.

1. In the **Inbound rules** section, choose **Add rule**.

1. For **Type**, choose HTTPS.

1. For **Source** enter your VPC CIDR.

1. In the **Outbound rules** section, choose **Add rule**.

1. For **Type**, choose HTTPS.

1. For **Destination**, enter **0.0.0.0/0**.

1. Choose **Create security group**.

**Create an IAM role**

1. Open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the left navigation pane, under **Access management**, choose **Roles**.

1. In the central pane, choose **Create role**.

1. In the **Use case** section, depending on your compute choice, choose one of the following:
   + **EC2** (for Amazon EC2 and Amazon EKS on Amazon EC2)
   + **Elastic Container Service** and then **EC2 Role for Elastic Container Service** (for Amazon ECS on Amazon EC2)
   + **Elastic Container Service** and then **Elastic Container Service Task** (for Amazon ECS managed by Fargate)

1. Choose **Next**.

1. Enter a name for the role, then choose **Create role**.

## Running AWS Transform for mainframe Runtime on Amazon EC2
<a name="ba-running-on-ec2"></a>

To create an Amazon EC2 instance, use the following steps. 

**Create an Amazon EC2 instance**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. Choose **Launch instance**.

1. For **Instance type**, choose an EC2 available instance type.

1. In the **Key pair** section, either choose an existing key pair or create a new one.

1. In the **Network settings** section, choose **Select existing security group**.

1. For **Common security groups**, choose **M2BluagePrivateLink-SG**.

1. Expand the **Advanced details** section.

1. For **IAM instance profile**, choose the IAM role that you created earlier.

1. Choose **Launch instance**.

**Install the application on the Amazon EC2 instance**

1. When the state of the Amazon EC2 instance changes to **Running**, connect to the instance.

1. Install the following software components on the instance (Refer to the versions mentioned into the [AWS Transform for mainframe release notes](ba-release-notes.md)):
   + Java Runtime Environment (JRE).
   + Apache Tomcat.
   + AWS Transform for mainframe Runtime (on Amazon EC2). Install the AWS Transform for mainframe runtime at the root of Apache Tomcat installation folder (some files will be added while others will be overwritten).

   To install the additional webapps delivered alongside the AWS Transform for mainframe Runtime archive, set up a secondary instance of the Apache Tomcat server, and decompress the webapps archive at that location. For detailed instructions, see [AWS Transform for mainframe Runtime artifacts](ba-runtime-artifacts.md).

## Running AWS Transform for mainframe Runtime on Amazon ECS on Amazon EC2
<a name="ba-running-on-ecs-on-ec2"></a>

1. Create an Amazon ECS cluster, with **Amazon EC2 instances** as an underlying infrastructure. See [Getting started with Windows on Amazon EC2](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-ecs-ec2-v2.html#getting-started-ec2-cluster-v2) in the Amazon Elastic Container Service Developer Guide.

1. Specify the IAM role that you created in the previous steps.

1. Choose an EC2 instance type.

1. In **Network settings for Amazon EC2 instances**, choose the security group that you created in the previous steps.

## Running AWS Transform for mainframe Runtime on Amazon EKS on Amazon EC2
<a name="ba-running-on-eks-on-ec2"></a>

1. Create an Amazon EKS cluster. See [Creating an Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html) in the *Amazon EKS User Guide*.

1. As mentioned previously, a security group is created on your behalf.

1. Create a node group. Specify the IAM role that you created in the previous steps.

1. Choose an EC2 instance type.

1. Amazon EKS will automatically assign the security group to the spawned Amazon EC2 instances.

## Running AWS Transform for mainframe Runtime on Amazon ECS managed by AWS Fargate
<a name="ba-running-on-fargate"></a>

Create an Amazon ECS cluster with **AWS Fargate (serverless)** as an underlying infrastructure. See [Getting started with Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-fargate.html) in the *Amazon Elastic Container Service Developer Guide*.

# AWS Transform for mainframe Runtime artifacts
<a name="ba-runtime-artifacts"></a>

AWS Transform for mainframe Runtime artifacts are the components for deploying and running modernized applications. This document outlines the different types of artifacts available, their storage locations, and how to access them.

## AWS Transform for mainframe Runtime artifacts
<a name="ba-runtime-artifacts-contents"></a>

### Artifacts contents
<a name="ba-runtime-artifacts-artifacts"></a>

In both Release and Pre-release buckets, you'll find:

**gapwalk-x.y.z.zip**

This archive, where x.y.z represents the version number (see [AWS Transform for mainframe versioning](https://docs.aws.amazon.com/m2/latest/userguide/ba-versioning.html)), contains the core AWS Transform for mainframe Runtime components essential for executing AWS Transform for mainframe applications, including:


| Artifact | Description | Type | Distribution Folder | 
| --- | --- | --- | --- | 
| gapwalk-application-x.y.z.war | AWS Transform for mainframe main web application Gapwalk | War | webapps | 
| \$1.jar | AWS Transform for mainframe Runtime Framework Shared Libraries (Gapwalk) | Jars | shared | 
| gapwalk-\$1-x.y.z.war | AWS Transform for mainframe additional web applications (utility-pgm, hierarchical support, ... ) | War | webapps-extra | 
| bac-x.y.z.war / jac-x.y.z.war | AWS Transform for mainframe Administration Consoles (non-standalone) | War | webapps-consoles | 

**aws-bluage-webapps-x.y.z.zip**

This archive, where x.y.z follows the same versioning scheme as above, includes AWS Transform for mainframe Administration Consoles (standalone)
+ **BAC** (Blusam console) WAR file, which is used for monitoring the Blusam database.
+ **JAC** (JICS console) WAR file, used for monitoring the JICS database.
+ Necessary supporting libraries.

### Package Signature Verification
<a name="ba-runtime-signed"></a>

The released zip files are provided as digitally signed ZIP archives to ensure security and authenticity. Digital signatures help verify that the files you download are genuine, unaltered, and officially released by our organization. This prevents tampering and protects against malware or compromised files that could be maliciously distributed.

To verify the signature of the ZIP file before using it, you can use the following command:

`jarsigner -verify -certs -verbose aws-bluage-runtime-x.y.z.zip`

Here the result example for a certified file :

```
...
jar verified.
```

For details on how security vulnerabilities are addressed, see [AWS Mainframe Modernization Refactor with AWS Transform for mainframe release overview](https://docs.aws.amazon.com/m2/latest/userguide/lifecycle-m2.html#lifecycle-ba-overview).

**Note**  
While we strive to release our products without CVEs, new CVEs may appear later on.

# Deploy AWS Transform for mainframe Runtime on Amazon EC2
<a name="ba-deploy-ec2"></a>

You can learn how to set up AWS Transform for mainframe Runtime on Amazon EC2, how to update the runtime version, how to monitor your deployment by using Amazon CloudWatch alarms, and how to add licensed dependencies with the topics in this section. These instructions are applicable when you create Amazon EC2 instances as well as when you use Amazon ECS on Amazon EC2 or Amazon EKS on Amazon EC2.

Starting with alpha version 5.60.0, the AWS Transform for mainframe Runtime distribution includes a deployment folder with a comprehensive README.md file. This guide provides step-by-step Amazon EC2 deployment instructions, configuration options, and troubleshooting tips.

**Topics**
+ [Set up AWS Transform for mainframe Runtime on Amazon EC2](ba-runtime-deploy-ec2.md)
+ [Upgrade the AWS Transform for mainframe Runtime on Amazon EC2](ba-runtime-maint-ec2.md)
+ [Set up AWS Transform for mainframe Runtime (on Amazon EC2) Amazon CloudWatch alarms](ba-cw-alarms-ec2.md)
+ [Set up licensed dependencies in AWS Transform for mainframe Runtime on Amazon EC2](ba-runtime-dependencies-ec2.md)

# Set up AWS Transform for mainframe Runtime on Amazon EC2
<a name="ba-runtime-deploy-ec2"></a>

This topic explains how to set up and deploy the PlanetsDemo sample application using AWS Transform for mainframe Runtime on Amazon EC2.

**Topics**
+ [Prerequisites](#ba-runtime-deploy-prereq)
+ [Setting up](#ba-runtime-deploy-setup)
+ [Test the deployed application](#ba-runtime-deploy-test)

## Prerequisites
<a name="ba-runtime-deploy-prereq"></a>

Before you begin, make sure you complete the following prerequisites.
+ Configure the AWS CLI by following the steps in [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Create an Amazon EC2 instance using one of the supported instance types. For more information, see [Get started with Amazon EC2 Linux instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html).
+ Make sure you can connect to the Amazon EC2 instance successfully, for example by using SSM.
**Note**  
Throughout this guide, the Tomcat installation path is assumed to be `/m2-anywhere/tomcat-gapwalk/velocity`. Ensure you use this path when following the instructions below or adapt the following instruction to the path of your choice.
+ Download and extract AWS Transform for mainframe Runtime (on Amazon EC2) directly to the velocity directory `/m2-anywhere/tomcat-gapwalk/velocity` (the Tomcat installation folder). For instructions on how to retrieve the AWS Transform for mainframe Runtime artifacts, including information about storage, access, and content, see [AWS Transform for mainframe Runtime artifacts](ba-runtime-artifacts.md).
+ Download the [PlanetsDemo application archive](https://d3lkpej5ajcpac.cloudfront.net/demo/bluage/PlanetsDemo-v1.zip).
+ Unzip the archive and upload the application to an Amazon S3 bucket of your choice.
+ Create an Amazon Aurora PostgreSQL database for JICS. The AWS Transform for mainframe Runtime will automatically execute the `PlanetsDemo-v1/jics/sql/initJics.sql` script during the first startup. For information about how to create an Amazon Aurora PostgreSQL database, see [Creating and connecting to an Aurora PostgreSQL DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html#CHAP_GettingStarted.AuroraPostgreSQL.CreateDBCluster).

## Setting up
<a name="ba-runtime-deploy-setup"></a>

To set up the PlanetsDemo sample application, complete the following steps.

1. Connect to your Amazon EC2 instance and go to the `conf` folder under your Apache Tomcat installation folder. Open the `catalina.properties` file for editing and replace the line that starts with `common.loader` with the following line.

   ```
   common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","${catalina.home}/shared","${catalina.home}/shared/*.jar","${catalina.home}/extra","${catalina.home}/extra/*.jar"
   ```

1. Navigate to the `/m2-anywhere/tomcat-gapwalk/velocity/webapps` folder.

1. Copy the PlanetsDemo binaries available at `PlanetsDemo-v1/webapps/` folder from the Amazon S3 bucket using the following command.

   ```
   aws s3 cp s3://path-to-demo-app-webapps/ . --recursive
   ```
**Note**  
Replace `path-to-demo-app-webapps` with the correct Amazon S3 URI for the bucket where you previously unzipped the PlanetsDemo archive.

1. Copy the content of `PlanetsDemo-v1/config/` folder to `/m2-anywhere/tomcat-gapwalk/velocity/config/`.

1. Provide the connection information for the database that you created as part of the prerequisites in the following snippet in the `/m2-anywhere/tomcat-gapwalk/velocity/config/application-main.yml` file. For more information see, [Creating and connecting to an Aurora PostgreSQL DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html#CHAP_GettingStarted.AuroraPostgreSQL.CreateDBCluster).

   ```
   datasource:
      jicsDs:
        driver-class-name :  
        url: 
        username: 
        password: 
        type :
   ```

1. Start your Apache Tomcat server and verify the logs.

   ```
   /m2-anywhere/tomcat-gapwalk/velocity/startup.sh
   
   tail -f /m2-anywhere/tomcat-gapwalk/velocity/logs/catalina.log
   ```

   If you find error codes that start with a C followed by a number, such as CXXXX, note the error messages. For example, error code C5102 is a common error indicating an incorrect infrastructure configuration.

## Test the deployed application
<a name="ba-runtime-deploy-test"></a>

For an example of how to test the PlanetsDemo application, see [Test the PlanetsDemo application](ba-runtime-test-planetsdemo.md).

# Upgrade the AWS Transform for mainframe Runtime on Amazon EC2
<a name="ba-runtime-maint-ec2"></a>

This guide describes how to upgrade the AWS Transform for mainframe Runtime on Amazon EC2.

**Topics**
+ [Prerequisites](#ba-runtime-maint-prereq)
+ [Upgrade the AWS Transform for mainframe Runtime in the Amazon EC2 instance](#ba-runtime-maint-copy-files)
+ [Upgrade the AWS Transform for mainframe Runtime in a container](#ba-runtime-maint-copy-files)

## Prerequisites
<a name="ba-runtime-maint-prereq"></a>

Before you begin, make sure you meet the following prerequisites.
+ To check if there are specific instructions for your version, see [Upgrading instructions for AWS Transform for mainframe](ba-migration-notes.md).
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Ensure that you have an Amazon EC2 instance with an existing AWS Transform for mainframe Runtime installation. For more information, see [Get started with Amazon EC2 Linux instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html).
+ Make sure you can connect to the Amazon EC2 instance successfully, for example, by using SSM.
+ Download the AWS Transform for mainframe Runtime version you want to upgrade to. The framework consists of two archive files : `gapwalk-x.y.z.zip` and `aws-bluage-webapps-x.y.z.zip`. For more information, see [AWS Transform for mainframe Runtime artifacts](ba-runtime-artifacts.md).

## Upgrade the AWS Transform for mainframe Runtime in the Amazon EC2 instance
<a name="ba-runtime-maint-copy-files"></a>

Complete the following steps to upgrade the AWS Transform for mainframe Runtime.

1. Connect to your Amazon EC2 instance and change the user to **su** by running the following command.

   ```
   sudo su
   ```

   You need superuser privilege to run commands in this tutorial.

1. To extract the binaries, use the following commands. Run the commands in each folder.

   ```
   unzip gapwalk-x.y.z.zip
   unzip aws-bluage-webapps-x.y.z.zip
   ```

1. Stop the Apache Tomcat services by using the following commands.

   ```
   systemctl stop tomcat.service
   systemctl stop tomcat-webapps.service
   ```

1. Replace the content of `<your-tomcat-path>/shared/` with the content of `gapwalk-x.y.z/shared/`.

1. Replace `<your-tomcat-path>/webapps/gapwalk-application.war` with `gapwalk-x.y.z/webapps/gapwalk-application.war`.

1. Replace the war files in `<your-tomcat-path>/webapps/`, namely `bac.war` and `jac.war`, with the same files from `aws-bluage-webapps-x.y.z/velocity/webapps/`.

1. Start the Apache Tomcat services by running the following commands.

   ```
   systemctl start tomcat.service
   systemctl start tomcat-webapps.service
   ```

1. Check the logs.

To check the status of the deployed application, run the following commands.

```
curl http://localhost:8080/gapwalk-application/
```

The following message should appear.

```
Jics application is running
```

```
curl http://localhost:8181/jac/api/services/rest/jicsservice/
```

The following message should appear.

```
Jics application is running
```

```
curl http://localhost:8181/bac/api/services/rest/bluesamserver/serverIsUp
```

The response should be empty.

The AWS Transform for mainframe runtime is successfully upgraded.

## Upgrade the AWS Transform for mainframe Runtime in a container
<a name="ba-runtime-maint-copy-files"></a>

Complete the following steps to upgrade the AWS Transform for mainframe Runtime.

1. Rebuild your Docker image with the desired AWS Transform for mainframe Runtime version. For instructions, see [Set up AWS Transform for mainframe Runtime on Amazon EC2](ba-runtime-deploy-ec2.md).

1. Push your Docker image to your Amazon ECR repository.

1. Stop and restart your Amazon ECS or Amazon EKS service.

1. Check the logs.

The AWS Transform for mainframe Runtime is successfully upgraded.

# Set up AWS Transform for mainframe Runtime (on Amazon EC2) Amazon CloudWatch alarms
<a name="ba-cw-alarms-ec2"></a>

You can set up CloudWatch to receive your application log and add an alarm to warn you of possible errors. This allows you to have more visible notifications whenever your deployed applications encounter exceptions. The following sections help you understand and learn about the configuration of CloudWatch logging and alarm setup.

## Enable CloudWatch logging
<a name="ba-cw-log-deploy"></a>

To enable CloudWatch logging, create a `logback-cloudwatch.xml` file in the config folder using the configuration template provided in the following section. Then, reference this file in the `application-main.yml` file by uncommenting the following lines:

```
# logging:
#  config: classpath:logback-cloudwatch.xml
```

 After uncommenting these lines, CloudWatch logging will be activated and can be further configured as explained in the following sections.

## Configuration of CloudWatch logging
<a name="config-cw-log"></a>

Use the following template to create the `logback-cloudwatch.xml` file:

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration>

    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%date{yyyy-MM-dd HH:mm:ss.SSS,UTC}  %level --- [%thread{15}] %logger{40} : %msg%n%xThrowable</pattern>
        </encoder>
    </appender>

    <appender name="cloudwatch" class="com.netfective.bluage.runtime.cloudwatchlogger.CloudWatchAppender">
        <logGroup>BluAgeRuntimeOnEC2-Logs</logGroup>
        <logStream>%date{yyyy-MM-dd,UTC}.%instanceId.%uuid</logStream>
        <layout>
            <pattern>%date{yyyy-MM-dd HH:mm:ss.SSS,UTC}  %level --- [%thread{15}] %logger{40} : %msg%n%xThrowable</pattern>
        </layout>
        <appender-ref ref="console" />
    </appender>

    <root level="INFO">
        <appender-ref ref="cloudwatch" />
    </root>
</configuration>
```

Everything outside the <appender name="cloudwatch"/> element is standard logback configuration. There are two appenders in this file: a console appender to send logs to the console and a CloudWatch appender to send logs to CloudWatch.

The `level` attribute in the `root` element specifies the logging level of the entire application.

The required values inside the tag <appender name="cloudwatch"/> are: 
+ <logGroup/>:Sets the name of the log group in CloudWatch. If the value is not specified it defaults to `BluAgeRuntimeOnEC2-Logs`. If the log group doesn’t exist it will be created automatically. This behavior can be changed through configuration, which is covered below.
+ <logStream/>: Sets the name of the logStream (inside of the log group) in CloudWatch.

Optional values: 
+ <region/>: Overrides the Region that the log stream will be written to. By default, logs go to the same Region as the EC2 instance.
+ <layout/>: The pattern the log messages will use. 
+ <maxbatchsize/>: The maximum number of log messages to send to CloudWatch per operation.
+ <maxbatchtimemillis/>: The time in milliseconds to allow for CloudWatch logs to be written.
+ <maxqueuewaittimemillis/>: The time in milliseconds to try to insert requests in the internal log queue.
+ <internalqueuesize/>: The maximum size of the internal queue.
+ <createlogdests/>: Create log group and log stream if they don't exist.
+ <initialwaittimemillis/>: The amount of time that you want the thread to sleep on startup. This initial wait allows for an initial accrual of logs.
+ <maxeventmessagesize/>: The maximum size of a log event. Logs that exceed this size won’t be sent.
+ <truncateeventmessages/>: Truncate messages that are too long.
+ <printrejectedevents/>: Enable the emergency appender.

## CloudWatch setup
<a name="cw-setup"></a>

In order for the above configuration to correctly push logs to CloudWatch, update your Amazon EC2 IAM instance profile role to grant it additional permissions for the `BluAgeRuntimeOnEC2-Logs` log group and its log streams: 
+ `logs:CreateLogStream`
+ `logs:DescribeLogStreams`
+ `logs:CreateLogGroup`
+ `logs:PutLogEvents`
+ `logs:DescribeLogGroups`

## Alarm setup
<a name="alarm-setup"></a>

Thanks to CloudWatch logs, you can then configure different metrics and alarms, depending on your application and your needs. Specifically, you can set up proactive alarms for usage alerts, in order to be warned in the case of errors that might put your application in a grace period (and in the end, prevent it from working at all). To achieve this, you can add a metric concerning the "Error C5001" string in the logs, which highlights errors in the connection to the AWS Transform for mainframe control system. You can then define an alarm that reacts to this metric. 

# Set up licensed dependencies in AWS Transform for mainframe Runtime on Amazon EC2
<a name="ba-runtime-dependencies-ec2"></a>

This guide describes how to set up additional licensed dependencies that you can use with AWS Transform for mainframe Runtime on Amazon EC2.

**Topics**
+ [Prerequisites](#ba-runtime-dependencies-prereq)
+ [Installation steps](#ba-runtime-dependencies-overview)

## Prerequisites
<a name="ba-runtime-dependencies-prereq"></a>

Before you begin, make sure you complete the following prerequisites.
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Make sure that you have an Amazon EC2 instance with AWS Transform for mainframe Runtime (on Amazon EC2) installed. For more information, see [Get started with Amazon EC2 Linux instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html).
+ Make sure you can connect to the Amazon EC2 instance successfully, for example, by using SSM.
+ Get the following dependencies from their sources.

### Oracle database
<a name="ba-runtime-dependencies-prereq-oracle"></a>

Supply an [Oracle database driver](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html). We tested the AWS Transform for mainframe Runtime (on Amazon EC2) functionality with version **ojdbc11-23.3.0.23.09.jar**, but a more recent version might be compatible.

### IBM MQ connection
<a name="ba-runtime-dependencies-prereq-mq"></a>

Supply an [IBM MQ client](https://www.ibm.com/support/pages/mqc91-ibm-mq-clients). We tested the AWS Transform for mainframe Runtime (on Amazon EC2) functionality with version **com.ibm.mq.jakarta.client-9.3.4.1.jar**, but a more recent version might be compatible.

With this dependency version, also supply the following transitive dependencies:
+ bcprov-jdk15to18-1.76.jar
+ bcpkix-jdk15to18-1.76.jar
+ bcutil-jdk15to18-1.76.jar

### DDS Printer files
<a name="ba-runtime-dependencies-prereq-dds"></a>

Supply the Jasper reports library (https://community.jaspersoft.com/download-jaspersoft/community-edition). We tested the AWS Transform for mainframe Runtime (on Amazon EC2) functionality with **jasperreports-6.16.0.jar**, but a more recent version might be compatible.

With this dependency version, also supply the following transitive dependencies:
+ castor-core-1.4.1.jar
+ castor-xml-1.4.1.jar
+ commons-digester-2.1.jar
+ ecj-3.21.0.jar
+ itext-2.1.7.js8.jar
+ javax.inject-1.jar
+ jcommon-1.0.23.jar
+ jfreechart-1.0.19.jar
+ commons-beanutils-1.9.4.jar
+ commons-collections-3.2.2.jar

## Installation steps
<a name="ba-runtime-dependencies-overview"></a>

To install the dependencies, complete the following steps.

1. Connect to your Amazon EC2 instance and change the user to **su** by running the following command.

   ```
   sudo su
   ```

   You need Superuser privilege to run commands in this tutorial.

1. Navigate to the `<your-tomcat-path>/extra/` folder.

   ```
   cd <your-tomcat-path>/extra/
   ```

1. Copy any of the above dependencies as required at this folder.
**Note**  
For JAC and BAC webapps with Oracle-hosted databases, ensure you include the Oracle database driver (ojdbc) in this folder.

1. Stop and start the tomcat.service by running the following commands.

   ```
   systemctl stop tomcat.service
   ```

   ```
   systemctl start tomcat.service
   ```

1. Check the status of the service to make sure it is running.

   ```
   systemctl status tomcat.service
   ```

1. Verify the logs.

# Deploy AWS Transform for mainframe Runtime on containers on Amazon ECS and Amazon EKS
<a name="ba-deploy-container"></a>

You can use the topics in this section to learn how to set up AWS Transform for mainframe Runtime on containers to deploy it on Amazon ECS (managed by Amazon EC2 or AWS Fargate), and Amazon EKS managed by Amazon EC2, how to update the runtime version, how to monitor your deployment by using Amazon CloudWatch alarms, and how to add licensed dependencies.

**Note**  
This is not compatible with Amazon EKS managed by AWS Fargate.

**Topics**
+ [Set up AWS Transform for mainframe Runtime on container](ba-runtime-deploy-container.md)
+ [Upgrade the AWS Transform for mainframe Runtime on container](ba-runtime-maint-container.md)
+ [Set up Amazon CloudWatch alarms for AWS Transform for mainframe Runtime on container](ba-cw-alarms-container.md)
+ [Set up licensed dependencies in AWS Transform for mainframe Runtime on container](ba-runtime-dependencies-container.md)

# Set up AWS Transform for mainframe Runtime on container
<a name="ba-runtime-deploy-container"></a>

This topic explains how to set up and deploy the PlanetsDemo sample application using AWS Transform for mainframe Runtime on a docker container.

AWS Transform for mainframe Runtime on container is available for Amazon ECS managed by Amazon EC2, Amazon ECS managed by AWS Fargate, and Amazon EKS managed by Amazon EC2. It isn't compatible with Amazon EKS managed by AWS Fargate.

**Topics**
+ [Prerequisites](#ba-runtime-deploy-prereq)
+ [Setting up](#ba-runtime-deploy-setup)
+ [Test the deployed application](#ba-runtime-deploy-test)

## Prerequisites
<a name="ba-runtime-deploy-prereq"></a>

Before you begin, make sure you complete the following prerequisites.
+ Configure the AWS CLI by following the steps in [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Download the AWS Transform for mainframe Runtime binaries. For instructions, see [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Download the Apache Tomcat binaries.
+ Download the [PlanetsDemo application archive](https://d3lkpej5ajcpac.cloudfront.net/demo/bluage/PlanetsDemo-v1.zip).
+ Create an Amazon Aurora PostgreSQL database for JICS, and run the `PlanetsDemo-v1/jics/sql/initJics.sql` query on it. For information about how to create an Amazon Aurora PostgreSQL database see, [Creating and connecting to an Aurora PostgreSQL DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html#CHAP_GettingStarted.AuroraPostgreSQL.CreateDBCluster).

## Setting up
<a name="ba-runtime-deploy-setup"></a>

To set up the PlanetsDemo sample application, complete the following steps.

1. After downloading the Apache Tomcat binaries, extract the contents, and go to the `conf` folder. Open the `catalina.properties` file for editing and replace the line that starts with `common.loader` with the following line.

   ```
   common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","${catalina.home}/shared","${catalina.home}/shared/*.jar","${catalina.home}/extra","${catalina.home}/extra/*.jar"
   ```

1. Compress the Apache Tomcat folder by using the tar command to build a `tar.gz` archive.

1. Prepare a [Dockerfile](https://docs.docker.com/engine/reference/builder/) to build your custom image based on the provided runtime binaries and Apache Tomcat server binaries. See the following example Dockerfile. The goal is to install Apache Tomcat, followed by AWS Transform for mainframe Runtime (for Amazon ECS managed by AWS Fargate) extracted at the root of Apache Tomcat installation directory, and then to install the sample modernized application named PlanetsDemo.
**Note**  
The contents of install-gapwalk.sh and install-app.sh scripts, which are used in this example Dockerfile, are listed after the Dockerfile.

   ```
   FROM --platform=linux/x86_64 amazonlinux:2
   
   RUN mkdir -p /workdir/apps
   WORKDIR /workdir
   COPY install-gapwalk.sh .
   COPY install-app.sh .
   RUN chmod +x install-gapwalk.sh
   RUN chmod +x install-app.sh
   
   # Install Java and AWS CLI v2-y
   RUN yum install sudo java-17-amazon-corretto unzip tar -y
   RUN sudo yum remove awscli -y
   RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
   RUN sudo unzip awscliv2.zip
   RUN sudo ./aws/install
   
   # Installation dir
   RUN mkdir -p /usr/local/velocity/installation/gapwalk
   # Copy PlanetsDemo archive to a dedicated apps dir
   COPY PlanetsDemo-v1.zip /workdir/apps/
   
   # Copy resources (tomcat, blu age runtime) to installation dir
   COPY tomcat.tar.gz /usr/local/velocity/installation/tomcat.tar.gz
   COPY aws-bluage-runtime-4.x.x.zip /usr/local/velocity/installation/gapwalk/gapwalk.zip
   
   # run relevant installation scripts
   RUN ./install-gapwalk.sh
   RUN ./install-app.sh
   
   EXPOSE 8080
   EXPOSE 8081
   # ...
   
   WORKDIR /bluage/tomcat.gapwalk/velocity
   # Run Command to start Tomcat server
   CMD ["sh", "-c", "sudo bin/catalina.sh run"]
   ```

   The following are the contents of `install-gapwalk.sh.`

   ```
   # Vars
   TEMP_DIR=/bluage-on-fargate/tomcat.gapwalk/temp
   
   # Install
   echo "Installing Gapwalk and Tomcat"
   sudo rm -rf /bluage-on-fargate
   mkdir -p ${TEMP_DIR}
   # Copy AWS Transform for mainframe runtime and tomcat archives to temporary extraction dir
   sudo cp /usr/local/velocity/installation/gapwalk/gapwalk.zip ${TEMP_DIR}
   sudo cp /usr/local/velocity/installation/tomcat.tar.gz ${TEMP_DIR}
   # Create velocity dir
   mkdir -p /bluage/tomcat.gapwalk/velocity
   # Extract tomcat files
   tar -xvf ${TEMP_DIR}/tomcat.tar.gz -C ${TEMP_DIR}
   # Copy all tomcat files to velocity dir
   cp -fr ${TEMP_DIR}/apache-tomcat-10.x.x/* /bluage/tomcat.gapwalk/velocity
   # Remove default webapps of Tomcat
   rm -f /bluage-on-fargate/tomcat.gapwalk/velocity/webapps/*
   # Extract AWS Transform for mainframe runtime at velocity dir
   unzip ${TEMP_DIR}/gapwalk.zip -d /bluage/tomcat.gapwalk
   # Remove temporary extraction dir
   sudo rm -rf ${TEMP_DIR}
   ```

   The following are the contents of `install-app.sh`.

   ```
   #!/bin/sh
   
   APP_DIR=/workdir/apps
   TOMCAT_GAPWALK_DIR=/bluage-on-fargate/tomcat.gapwalk
   
   unzip ${APP_DIR}/PlanetsDemo-v1.zip -d ${APP_DIR}
   cp -r ${APP_DIR}/webapps/* ${TOMCAT_GAPWALK_DIR}/velocity/webapps/
   cp -r ${APP_DIR}/config/* ${TOMCAT_GAPWALK_DIR}/velocity/config/
   ```

1. Provide the connection information for the database that you created as part of the prerequisites in the following snippet in the `application-main.yml` file, which is located in the `{TOMCAT_GAPWALK_DIR}/config` folder. For more information see, [Creating and connecting to an Aurora PostgreSQL DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html#CHAP_GettingStarted.AuroraPostgreSQL.CreateDBCluster).

   ```
   datasource:
      jicsDs:
        driver-class-name :  
        url: 
        username: 
        password: 
        type :
   ```

1. Build and push the image to your Amazon ECR repository. For instructions, see [Pushing a Docker image](https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html) in the Amazon Elastic Container Registry User Guide. Then, depending on your situation, either create an Amazon EKS pod or an Amazon ECS task definition using your Amazon ECR image, and deploy it to your cluster. For example on creating these, see [Creating a task definition using the console](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html) in the *Amazon Elastic Container Service (Amazon ECS) Developer Guide* and [Deploy a sample application](https://docs.aws.amazon.com/eks/latest/userguide/sample-deployment.html) in the *Amazon EKS User Guide*.

1.  Specifically, for **Amazon ECS managed by AWS Fargate** case, when creating the Task definition, use the IAM role you created as part of the initial Infrastructure setup. Then, while creating the service, expand the **Networking** section, and configure the VPC, subnets, and security group that you created as part of the initial Infrastructure setup. See, [Infrastructure setup requirements for AWS Transform for mainframe Runtime ](https://docs.aws.amazon.com/m2/latest/userguide/ba-infrastructure-setup.html).

## Test the deployed application
<a name="ba-runtime-deploy-test"></a>

For an example of how to test the PlanetsDemo application, see [Test the PlanetsDemo application](ba-runtime-test-planetsdemo.md).

# Upgrade the AWS Transform for mainframe Runtime on container
<a name="ba-runtime-maint-container"></a>

This guide describes how to upgrade the AWS Transform for mainframe Runtime on container. To do this, you need to first complete some prerequisites, and then work with Docker image to upgrade the AWS Transform for mainframe Runtime.

**Topics**
+ [Prerequisites](#ba-runtime-maint-prereq)
+ [Upgrade the AWS Transform for mainframe Runtime](#ba-runtime-maint-copy-files)

## Prerequisites
<a name="ba-runtime-maint-prereq"></a>

Before you begin, make sure you meet the following prerequisites.
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Download the version of the AWS Transform for mainframe Runtime that you want to upgrade to. For more information, see [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md). The framework consists of two binary files: `aws-bluage-runtime-x.y.z.zip` and `aws-bluage-webapps-x.y.z.zip`.

## Upgrade the AWS Transform for mainframe Runtime
<a name="ba-runtime-maint-copy-files"></a>

Complete the following steps to upgrade the AWS Transform for mainframe Runtime.

1. Rebuild your Docker image with the desired AWS Transform for mainframe Runtime version. For instructions, see [Set up AWS Transform for mainframe Runtime on container](ba-runtime-deploy-container.md).

1. Push your Docker image to your Amazon ECR repository.

1. Stop and restart your Amazon ECS or Amazon EKS service.

1. Verify the logs.

The AWS Transform for mainframe Runtime is successfully upgraded.

# Set up Amazon CloudWatch alarms for AWS Transform for mainframe Runtime on container
<a name="ba-cw-alarms-container"></a>

You can set up CloudWatch to have more visible notifications whenever your deployed applications encounter exceptions. This helps you to monitor your application log redirected to CloudWatch, and add an alarm to warn you of possible errors.

## Alarm setup
<a name="alarm-setup"></a>

With CloudWatch logs, you can configure any number of metrics and alarms, depending on your application and your needs.

Specifically, you can set up proactive alarms for usage alerts directly during your cluster creation, so that you get notified when errors occur. To highlight errors in the connection to the AWS Transform for mainframe control system, add a metric concerning the string "Error C" in the logs. You can then define an alarm that reacts to this metric. 

# Set up licensed dependencies in AWS Transform for mainframe Runtime on container
<a name="ba-runtime-dependencies-container"></a>

This topic describes how to set up additional licensed dependencies that you can use with AWS Transform for mainframe Runtime on container.

**Topics**
+ [Prerequisites](#ba-runtime-dependencies-prereq)
+ [Overview](#ba-runtime-dependencies-overview)

## Prerequisites
<a name="ba-runtime-dependencies-prereq"></a>

Before you begin, make sure you complete the following prerequisites.
+ Complete [AWS Transform for mainframe Runtime prerequisites](ba-runtime-setup-prereq.md) and [Onboarding AWS Transform for mainframe Runtime](ba-runtime-setup-onboard.md).
+ Get the following dependencies from their source.

### Oracle database
<a name="ba-runtime-dependencies-prereq-oracle"></a>

Supply an [Oracle database driver]( https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html). For example, **ojdbc11-23.3.0.23.09.jar**.

### IBM MQ connection
<a name="ba-runtime-dependencies-prereq-mq"></a>

Supply an [IBM MQ client](https://www.ibm.com/support/pages/mqc91-ibm-mq-clients). For example, **com.ibm.mq.jakarta.client-9.3.4.1.jar**.

With this dependency version, also supply the following transitive dependencies:
+ bcprov-jdk15to18-1.76.jar
+ bcpkix-jdk15to18-1.76.jar
+ bcutil-jdk15to18-1.76.jar

### DDS Printer files
<a name="ba-runtime-dependencies-prereq-dds"></a>

Supply the Jasper reports library (https://community.jaspersoft.com/download-jaspersoft/community-edition). For example, **jasperreports-6.16.0.jar**, but a more recent version might be compatible.

With this dependency version, also supply the following transitive dependencies:
+ castor-core-1.4.1.jar
+ castor-xml-1.4.1.jar
+ commons-digester-2.1.jar
+ ecj-3.21.0.jar
+ itext-2.1.7.js8.jar
+ javax.inject-1.jar
+ jcommon-1.0.23.jar
+ jfreechart-1.0.19.jar
+ commons-beanutils-1.9.4.jar
+ commons-collections-3.2.2.jar

## Overview
<a name="ba-runtime-dependencies-overview"></a>

To install the dependencies, complete the following steps.

1. Copy any of the above dependencies as required to your Docker image build folder.

1. If your JICS database is hosted on Oracle, provide the Oracle database driver in `your-tomcat-path/extra`.

1. On your Dockerfile, copy these dependencies to `your-tomcat-path/extra`.

1. Build your Docker image, and then push it to Amazon ECR.

1. Stop and restart your Amazon ECS or Amazon EKS service.

1. Check the logs.

# Test the PlanetsDemo application
<a name="ba-runtime-test-planetsdemo"></a>

To check the status of the deployed PlanetsDemo application, run the following commands after you replace `load-balancer-DNS-name`, `listener-port`, and `web-binary-name` with the correct values for your setup.

```
curl http://load-balancer-DNS-name:listener-port/gapwalk-application/
```

If the application is running, you see the following output message: `Jics application is running`.

Next, run the following command.

```
curl http://load-balancer-DNS-name:listener-port/jac/api/services/rest/jicsservice/
```

If the application is running, you see the following output message: `Jics application is running`.

```
Jics application is running
```

If you have configured Blusam, you can expect an empty response when you run the following command.

```
curl http://load-balancer-DNS-name:listener-port/bac/api/services/rest/bluesamserver/serverIsUp
```

Note the name of the web binary (PlanetsDemo-web-1.0.0, if unchanged). To access the PlanetsDemo application, use a URL of the following format.

```
https://load-balancer-DNS-name:listener-port/web-binary-name
```

After the PlanetsDemo application starts, the home page is displayed.

![\[Home page\]](http://docs.aws.amazon.com/m2/latest/userguide/images/PlanetsDemo-homepage.png)


Enter PINQ in the text box and then press Enter. The data inquiry page is displayed.

![\[Data inquiry page\]](http://docs.aws.amazon.com/m2/latest/userguide/images/PlanetsDemo-app.png)


For example, enter EARTH in the PlanetsDemo name field, and then press Enter. The page for the planet you entered is displayed.

![\[EARTH page\]](http://docs.aws.amazon.com/m2/latest/userguide/images/PlanetsDemo-EARTH.png)
