|
1 | 1 | # webMethods API Control Plane Agent for Amazon API Gateway
|
2 | 2 |
|
3 |
| -This repository holds a sample stand-alone Agent implementation Gradle project for Amazon API Gateway, utilizing the Agent SDK. Key functionalities include: |
4 |
| - |
5 |
| -1. Registering AWS API Gateway with API Control Plane. |
6 |
| -2. Retrieving AWS API Gateway’s health status and sending it to API Control Plane. |
7 |
| -3. Publishing AWS API Gateway’s assets to API Control Plane. |
8 |
| -4. Synchronizing assets between AWS API Gateway and API Control Plane. |
9 |
| -5. Retrieving metrics from AWS API Gateway to API Control Plane. |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +<br> |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +This repository holds an agent implementation Java project for connecting Amazon API Gateway with API Control Plane, utilizing the **Agent SDK**. The key functionalities include: |
| 13 | + |
| 14 | +1. Registering Amazon API Gateway with API Control Plane. |
| 15 | +2. Retrieving Amazon API Gateway’s health status and sending it to API Control Plane. |
| 16 | +3. Publishing Amazon API Gateway’s assets to API Control Plane. |
| 17 | +4. Synchronizing assets between Amazon API Gateway and API Control Plane. |
| 18 | +5. Retrieving metrics from Amazon API Gateway to API Control Plane. |
| 19 | + |
| 20 | +This project is developed using **Java 17** and **Gradle 7.4.2**<br> |
| 21 | +If you plan to upgrade *Gradle*, ensure that you also upgrade the supported *Java version* accordingly. For details about the compatibility between *Java* and *Gradle* versions, see [Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html). |
| 22 | + |
| 23 | +## Table of Contents |
| 24 | +- [Implementation Overview](#implementation-overview) |
| 25 | + - [Core Implementation Logic](docs/core-logic.md) |
| 26 | + - [Customize the Core Implementation Logic](common/) |
| 27 | +- [How is this Repository Structured?](docs/repo-structure.md) |
| 28 | +- [Co-relation Between Amazon API Gateway and API Control Plane Terminologies](docs/corelation.md) |
| 29 | +- [How to Build the Gradle Project?](devops/) |
| 30 | +- [How to Deploy and Run the AWS Agent as a Spring Boot application in Docker?](application/) |
| 31 | + - [Authentication](docs/authentication.md) |
| 32 | + - [How to Create the Runtime Type in API Control Plane?](docs/runtime_service_mgmt_api.md) |
| 33 | +- [How to Deploy and Run the AWS Agent in AWS Lambda?](functions/) |
| 34 | +- [Best Practices](docs/best-practices.md) |
10 | 35 |
|
11 | 36 |
|
12 | 37 | ## Implementation Overview
|
13 | 38 |
|
14 |
| -The implementation utilizes the Manual approach, leveraging the AWS SDK for connection management and authentication. For details about the approaches, see [Agent SDK](https://docs.webmethods.io/apicontrolplane/agent_sdk/chapter2wco/#gsc.tab=0) documentation. |
15 |
| - |
16 |
| -Additionally, **AWS CloudWatch** and **CloudTrail** services are leveraged to monitor API metrics and API activity respectively. |
17 |
| - |
18 |
| -**Note:** The agent implementation is compatible with API Control Plane version, 11.0.3. The current implementation supports only the REST APIs of AWS API Gateway. |
19 |
| - |
20 |
| -API Control Plane Agent for Amazon API Gateway offers two distinct deployment modes: |
21 |
| - |
22 |
| -- Spring Boot application |
23 |
| -- AWS Lambda |
24 |
| - |
25 |
| - |
26 |
| -## How is this repository structured? |
27 |
| - |
28 |
| -To know how the repository is structured, see [Repository structure](docs/repo-structure.md). |
| 39 | +The implementation utilizes the **Manual** approach of Agent SDK and provides options for deploying the AWS agent as a stand-alone application. For details about the approaches and deployment modes, see [Agent SDK](https://docs.webmethods.io/apicontrolplane/agent_sdk/chapter2wco/#gsc.tab=0) documentation. |
| 40 | +The implementation leverages the following Amazon services: |
| 41 | +- **AWS SDK** for connection management and authentication. |
| 42 | +- **Amazon CloudWatch** service for retrieving API metrics. |
| 43 | +- **Amazon CloudTrail** service for retrieving API activity. |
29 | 44 |
|
| 45 | +**Note:** ``` The agent implementation is compatible with API Control Plane version, 11.0.3 and currently supports only the REST APIs of Amazon API Gateway. ``` |
30 | 46 |
|
31 |
| -## Co-relation between Amazon API Gateway and API Control Plane terminologies |
| 47 | +The AWS agent can be deployed in the following ways: |
32 | 48 |
|
33 |
| -To understand the co-relation between Amazon API Gateway and API Control Plane terminologies, see [Co-relation](docs/corelation.md). |
| 49 | +- **Spring Boot application** |
| 50 | +- **AWS Lambda**<br> |
34 | 51 |
|
| 52 | +For a detailed understanding of how the agent for Amazon API Gateway is implemented, see [Core Implementation Logic](docs/core-logic.md). |
35 | 53 |
|
36 |
| -## How to build the Gradle project? |
| 54 | +The AWS agent developer can utilize this repository in the following ways: |
| 55 | + |
| 56 | +- Use the repository directly to build and deploy the AWS agent. |
| 57 | +- Fork the repository, customize the code as required, and then build and deploy the AWS agent. |
37 | 58 |
|
38 |
| -To build the Gradle project, see [How to build?](devops/) |
| 59 | +## How is this Repository Structured? |
39 | 60 |
|
40 |
| -The Jars are created at the following locations for both the deployment modes: |
41 |
| - |
42 |
| -**Spring boot application:** *application-0.0.1-SNAPSHOT* is created at application / build / libs <br><br> |
43 |
| -**AWS Lambda:** |
44 |
| -- *lambda-layer.zip* is created at functions / build / libs, which includes all dependencies to run lambda function. |
45 |
| -- *send-asset.jar* is created at Functions / send–asset / build / libs |
46 |
| -- *send-heartbeat.jar* is created at Functions / send-heartbeat / build / libs |
47 |
| -- *send-metrics.jar* is created at Functions / send-metrics / build / libs |
| 61 | +This section outlines the Git repository's structure, highlighting the purpose of each directory. For details, see [Repository structure](docs/repo-structure.md). |
48 | 62 |
|
49 | 63 |
|
50 |
| -## How to deploy a Spring boot application in Docker? |
| 64 | +## Co-relation Between Amazon API Gateway and API Control Plane Terminologies |
51 | 65 |
|
52 |
| -To deploy a Spring boot application in Docker, see [How to deploy?](application/) |
| 66 | +This section details the relationship and equivalence between the terminologies used in *Amazon API Gateway* and the *API Control Plane*. For details, see [Co-relation](docs/corelation.md). |
53 | 67 |
|
54 | 68 |
|
55 |
| -## Best Practices |
| 69 | +## How to Build the Gradle Project? |
56 | 70 |
|
57 |
| -To learn about the best practices, see [Best Practices](docs/best-practices.md). |
58 |
| - |
59 |
| - |
60 |
| -## References |
61 |
| -To learn about authentication, see [Authentication](docs/authentication.md) section. |
| 71 | +For details, see [How to build?](devops/) |
62 | 72 |
|
| 73 | +Once the Gradle project is built, the Jars are created at the following locations for both the deployment modes: |
63 | 74 |
|
| 75 | +**Spring Boot application**: **application-<*version*>-SNAPSHOT** is created at *application / build / libs* <br> |
64 | 76 |
|
| 77 | +**AWS Lambda:** |
| 78 | +- **lambda-layer.zip** is created at *functions / build / libs*, which includes all dependencies to run lambda function. |
| 79 | +- **send-asset.jar** is created at *functions / send–asset / build / libs* |
| 80 | +- **send-heartbeat.jar** is created at *functions / send-heartbeat / build / libs* |
| 81 | +- **send-metrics.jar** is created at *functions / send-metrics / build / libs* |
65 | 82 |
|
66 | 83 |
|
| 84 | +## How to Deploy and Run the AWS Agent as a Spring Boot Application in Docker? |
67 | 85 |
|
| 86 | +This section details how to deploy the AWS agent as a stand-alone application. For details, see [How to deploy?](application/) |
68 | 87 |
|
69 | 88 |
|
| 89 | +## How to Deploy and Run the AWS Agent in AWS Lambda? |
70 | 90 |
|
| 91 | +AWS Lambda is a function as a service provided by AWS that lets you deploy and run your application without provisioning or managing servers. You are responsible only for the application code that you provide Lambda and the configuration of how Lambda runs that code on your behalf. For details about AWS Lambda, see [AWS Lambda documentation](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html). |
71 | 92 |
|
| 93 | +Deploying an AWS agent in AWS Lambda lets you run the agent virtually without the need for administration of the underlying infrastructure. For details about the benefits of AWS Lambda, see [AWS Lambda documentation](https://docs.aws.amazon.com/whitepapers/latest/security-overview-aws-lambda/benefits-of-lambda.html). |
72 | 94 |
|
| 95 | +For details about how to deploy and run the AWS agent in AWS Lambda, see [How to deploy?](functions/) |
73 | 96 |
|
74 | 97 |
|
| 98 | +## Best Practices |
75 | 99 |
|
| 100 | +This section outlines the essential best practices for using this implementation and deploying the AWS agent. For details, see [Best Practices](docs/best-practices.md). |
76 | 101 |
|
77 | 102 |
|
| 103 | +## References |
| 104 | +- To learn about the authentication for a Spring boot application, see [Authentication](docs/authentication.md) section.<br> |
| 105 | +- To learn how to create the *runtime type* in the API Control Plane, see [Runtime Type Management Service API](docs/runtime_service_mgmt_api.md). |
78 | 106 |
|
0 commit comments