Skip to main content
Glama
ec2-funcs.sh725 B
#!/bin/bash # Function to list EC2 instances with their Name tag, either all or filtered list_instances() { filter=$1 if [[ "${filter,,}" == "all" || -z "${filter}" ]]; then # shellcheck disable=SC2016 aws ec2 describe-instances --query 'Reservations[*].Instances[?State.Name==`running`].[Tags[?Key==`Name`].Value | [0],InstanceId,InstanceType,PrivateIpAddress]' --output text | grep -E 'sdf|veritech|pinga|rebaser|forklift|edda' elif [[ "${filter,,}" != "all" ]]; then # shellcheck disable=SC2016 aws ec2 describe-instances --query 'Reservations[*].Instances[?State.Name==`running`].[Tags[?Key==`Name`].Value | [0],InstanceId,InstanceType,PrivateIpAddress]' --output text | grep -E "${filter}" fi }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server