Instances - AWS Elemental MediaConnect

Instances

An instance is a compute instance running on equipment in your data center and managed by MediaConnect Gateway. This instance is an on-premises implementation of the MediaConnect service and is contained within a gateway. Instances use bridges to communicate between your data center and the AWS Cloud. Instances are created by installing software on an on-premises server.

Registering a MediaConnect Gateway instance

You can register an instance by running a custom Linux command on the device that will be hosting the instance. You generate the command by following the instance registration process in the AWS Management Console.

To register a MediaConnect Gateway instance
  1. Open the MediaConnect console at https://console.aws.amazon.com/mediaconnect/.

  2. From the navigation pane, select Gateways. In the Gateways section, select the gateway you want to register the instance to.

  3. On the gateway Details page, select the Instances tab. Select Register instance.

  4. On the Register Gateway instances page, complete the following steps:

    1. For Activation key duration, enter the number of days that the activation key will remain active. After that number of days, the key will no longer work when registering a gateway instance.

    2. For Number of instances, enter the number of instances that you want to register to your gateway with this activation key.

    3. For Instance role, choose the IAM role to associate with your external instances.

    4. Select Generate registration command.

  5. A Linux command will be displayed. Copy the command. You must run this command on each instance you want to register to this gateway.

    Important

    The bash portion of the script must be run as root. If the command isn't run as root, an error is returned.

  6. After a few minutes, the instance will register to the gateway. All instances registered to this gateway will appear in the Instances tab.

Deregistering a gateway instance

You can deregister an instance you no longer want to use within MediaConnect Gateway. By deregistering the instance, it will no longer support bridges and will not be a part of your gateway. If you want to reuse the instance for Amazon ECS Anywhere or as another gateway instance, you will need to follow the additional steps in Step 6 to prepare the deregistered instance for reuse.

To deregister a gateway instance
  1. Open the MediaConnect console at https://console.aws.amazon.com/mediaconnect/.

  2. From the navigation pane, select Gateways. In the Gateways section, select the gateway that contains the instance you want to deregister.

  3. On the gateway Details page, select the Instances tab. Select the Instance ID of the instance you want to deregister.

  4. Select Deregister.

  5. Confirm the deregistration of the instance by selecting Deregister instance.

  6. Repeat the previous steps for any additional instances you need to deregister.

To reuse a gateway instance (optional)

If you want to reuse the instance for Amazon ECS Anywhere or as another gateway instance, you will need to complete the following steps.

  1. Open the MediaConnect console at https://console.aws.amazon.com/mediaconnect/.

  2. From the navigation pane, select Gateways. In the Gateways section, select the gateway that contains the instance you want to reuse.

  3. On the gateway Details page, select the Instances tab. Locate the Instance ID of the instance you want to reuse.

  4. Make sure that the Instance state is Deregistered for the instance you want to reuse.

  5. From a computer with the access to do so, connect to the instance using SSH.

  6. Run the following commands, in order.

    sudo docker stop $(docker ps -f "name=MediaConnectGatewayAgent" -q); \ sudo docker stop ecs-agent; \ sudo systemctl stop ecs amazon-ssm-agent; \ sudo yum remove -y amazon-ecs-init amazon-ssm-agent; `# or apt or snap as needed` \ sudo rm /var/lib/ecs /etc/ecs /var/lib/amazon/ssm /var/log/ecs /var/log/amazon/ssm -rf; \ sudo docker rm -f ecs-agent ssm-agent; \ sudo docker container rm -f $(docker ps -a -f "name=MediaConnectGatewayAgent" -q); \ sudo docker volume rm -f ecsdata docker run; \ sudo pkill -f -KILL network_bootstra[p]; \ sudo pkill -KILL mcproxy;

For more information about deleting a MediaConnect Gateway and its networks, see: Removing a gateway and its components (console)