Deploying Party Microservice on AWS

This section explains how to deploy the Party microservice on the AWS cloud. To do so, you need to perform the following tasks:

Deployment Artefacts

The Party microservice for AWS deployment is available as a single release bundle. For example, ms-party-package-aws-<release no>.zip.

This bundle contains the following files:

  • ms-party-package-aws-<release no>.jar
  • AWS Script files:

    • install-aws.sh: This script used to deploy the Party microservice in the standalone mode.
    • destroy-aws.sh: This script is used to undeploy and delete the resources.

The OAS Swagger JSON document will be available at /ms-party-package-aws-<release no>.jar/api.

Deploying Party Microservice on AWS

Prerequisites

Before deploying Party microservice on AWS, ensure to meet the following prerequisites:

  • Install the Azure Command Line Interface. For more information about the installation, click here.
  • Install the Python 2.7.x. For more information about the installation, click here.

To deploy the Party microservice on AWS, follow these steps.

  1. Download the generated zip file from the target folder to the installation folder.
  2. Extract the zip file.
  3. In addition to the API key, to enable the internal authentication, you must perform the JWT Authentication in the installation scripts.
  4. In the AWS Command Line, go to the installation directory.
  5. Modify the region information specific to your installation in the install-aws.sh script. For example, --region us-west-2, --event-source-arn arn:aws:kinesis:us-west-2, and --uri arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2.
  6. To deploy the microservice, execute the install-aws.sh shell script to create the resources.
  7. Sign in to the AWS portal and verify if the Lambda functions and API Gateways are created correctly.
    • Lambda Functions

    • API Gateways

  8. To obtain the API key for all the endpoints in AWS, follow these steps.
    1. Go to the API Key section under the Amazon API Gateway.
    2. Select the corresponding API key, and click Show.

      The API key must be a part of the header (x-api-key) in all the requests.

  9. After the successful deployment, database, collections, and reference data(master data) are loaded into the dynamo database for the Party microservice.
  10. The base path of the API Gateway URL is as follows.

    Base Path: https://<REST-API-ID>.execute-api.<LOCATION>.amazonaws.com/<DEPLOYMENT_ID>

    For example, https://0mnkccy9mh.execute-api.eu-west-2.amazonaws.com/ms-party-api

    The resource path of the endpoint is available in the swagger document of the respective APIs.

    A sample endpoint of the party could be https://0mnkccy9mh.execute-api.eu-west-2.amazonaws.com/ms-party-api/v1.0.0/party/parties.

You can obtain the Rest API ID from the Amazon API Gateway. Ensure to replace the location and deployment ID with appropriate values that are provided in the script during deployment.


Bookmark Name Actions
Feedback
x