This is a GraphQL API designed to retrieve service information by querying the cluster name, service name, and the region where the cluster is deployed. The long-term plan for this API is to expand its capabilities to interact with various AWS resources.
npm install
npm start
Server will be running on:
Playground:
localhost:3000/graphiql
API Endpoint:
localhost:3000/graphql
npm test
Query:
query getService($serviceNames: String!, $clusterName: String!, $clusterDeployedRegion: String!){
gdsServicesInfo(serviceNames: $serviceNames, clusterName: $clusterName, clusterDeployedRegion: $clusterDeployedRegion){
clusterArn
loadBalancers{
containerName
containerPort
targetGroupArn
}
}
}
# Varables
{
"serviceNames": "my-service-1,my-service-2",
"clusterName": "my-cluster",
"clusterDeployedRegion": "us-east-1"
}
The AWS SDK and CLI have certain limitations when it comes to retrieving service information. For instance, the describe-services command can only handle up to 10 services at a time. However, this API overcomes that limitation, allowing you to query information for as many services as you need in a single request. This makes it a more efficient and flexible tool for managing large-scale AWS environments.
More query examples will be added here.
David Dai and Phil Hadviger have significantly contributed to the development of this API with their valuable suggestions and improvements.
Please follow the guideline here
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.