Using Multiple Target Groups for Microservices Architectures | Scribe

    Using Multiple Target Groups for Microservices Architectures

    • Hafeez Baig |
    • 35 steps |
    • 3 minutes
    information ordinal icon

    Refer to the following guide to learn how to use IAM in the cloud\ <https://scribehow.com/shared/Creating_an_IAM_User_and_User_Group_in_AWS_Management_Console__hWNiiXlcRJKFqYZZEJD-cg>

    1

    Sign in to **AWS Management Console** as an **IAM User** **Pre-requisite** - Ensure you have selected the AWS region closest to your location\ For this guide, we will be using us-east-2 (Ohio) as a preferred choice

    2

    Type **EC2** in the search bar and click on **EC2** to view the EC2 Dashboard

    3

    On the EC2 dashboard click on **Instances** from the left bar to view the EC2 instances

    4

    On the top right corner click on the **Launch instances** dropdown button and click on the option **Launch instance from template**

    5

    **Choose a launch template** wizard will open, select the option **MyEc2LaunchTemplate**

    information ordinal icon

    Refer to this guide to learn how to create a Launch template for EC2\ <https://scribehow.com/shared/Creating_Launch_Templates_for_EC2_instances__cPATKkwbTkSqsAvJNxhlLA>

    6

    Scroll to the **Resource tags** section and type **Microservice A** in the Value

    7

    Scroll to the **User data** section and type the bash script

    8

    On the right side click on the **Launch instance** button

    9

    Successfully initiated launch of instance

    information ordinal icon

    Congratulations on successfully creating the instance! Well done!

    10

    On the EC2 dashboard, click on the **Target Groups** from the left bar

    information ordinal icon

    **What are target groups in EC2?** In Amazon EC2, target groups are a feature of Elastic Load Balancing (ELB) that help route incoming traffic to instances or containers registered with the target group.

    11

    **Target groups** wizard will open, on the right side click on the **Create target group** button

    12

    Scroll to the **Target group name** section and type "**microservice-a-target-group**" in the text input field

    13

    Scroll the page and click on the **Next** button

    14

    **Register targets** wizard will open, select the Name **Microservice A**

    15

    Scroll the page and click on the **Create target group** button

    16

    Successfully created the target group: **microservice-a-target-group**