Co-author – Srihari Ananda Kumar
The Amazon Elastic Compute Cloud (Amazon EC2) is a web-based service that provides scalable computing capacity that allows businesses to run application programs in the Amazon Web Services (AWS) Cloud.
Building a flow in IBM App Connect with Amazon EC2
Use App Connect to build flows that integrate with Amazon EC2 and other applications. The connector is displayed as Amazon EC2 on the App Connect User Interface (UI).
To allow App Connect to connect to your Amazon EC2 account, you need to fill in the connection fields that you see in the App Connect Designer Catalog page or flow editor. For more information on connection fields, see How to use IBM App Connect with Amazon EC2.
Amazon EC2 objects
The following are Amazon EC2 action objects that can be run in App Connect.
Objects
|
Description
|
Amazon Machine Images
|
An Amazon Machine Image (AMI) is the basic unit of deployment in Amazon EC2 and is one of the types of images you can create with Image Builder.
|
Availability zones
|
Availability zones are a collection of distinct areas in each region.
|
Instance types
|
Instance types include various combinations of CPU, memory, storage, and networking capacity.
|
Instances
|
An Amazon EC2 instance is a virtual server on Amazon Web Services.
|
Key pairs
|
A key pair, consisting of a public key and a private key, is a set of security credentials used to connect to an Amazon EC2 instance.
|
Launch templates
|
A launch template specifies instance configuration information.
|
Security groups
|
A security group acts as a virtual firewall for EC2 instances to control incoming and outgoing traffic.
|
Scenario 1: Stop, start or reboot the Amazon EC2 instance whenever a Zendesk Service ticket gets created
Consider this scenario; you are an IT personnel with permission to manage Amazon EC2 instances. You can start, stop, or reboot the instances whenever a Zendesk Service ticket gets created.
In this example, the flow checks the Zendesk Service ticket’s subject to whether to start, stop, or reboot the Amazon EC2 instance based on the instance ID from the Zendesk Service ticket. A slack message gets sent to notify the intended channel that the instance has been started, stopped, or rebooted.
In this flow:
- The event-driven flow is triggered whenever a new ticket gets created in Zendesk Service.
- If the Zendesk Service ticket Subject is equals to Stop Instance Request, Amazon EC2 stops the instance based on the Zendesk Service instance ID.
- If the Zendesk Service ticket Subject is equals to Start Instance Request, Amazon EC2 starts the instance based on the Zendesk Service instance ID.
- If the Zendesk Service ticket Subject is equals to Reboot Instance Request, Amazon EC2 reboots the instance based on the Zendesk Service instance ID.
- For each request, a Slack message gets sent to the intended channel. This message is sent to notify you whether the instance has started, stopped, or rebooted.
For example:
![](https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/GeXNZOBSFeQsxLeoHuTi_UC1.2.png)
6. Else, if the Zendesk Service ticket Subject doesn’t fit the above conditions, it exits the flow.