Skip to main content
Glama

AWS MCP Infrastructure

dynamodb.service.ts•2.05 kB
import { CreateTableCommand, DeleteTableCommand, DescribeTableCommand } from '@aws-sdk/client-dynamodb'; import { dynamoDBClient } from '../../config/aws.config'; import { logger } from '../../utils/logger'; export class DynamoDBService { async createTable(parameters: any) { try { const tableName = parameters.tableName || `mcp-table-${Date.now()}`; const command = new CreateTableCommand({ TableName: tableName, KeySchema: [ { AttributeName: parameters.partitionKey || 'id', KeyType: 'HASH', }, ], AttributeDefinitions: [ { AttributeName: parameters.partitionKey || 'id', AttributeType: 'S', }, ], BillingMode: 'PAY_PER_REQUEST', Tags: [ { Key: 'CreatedBy', Value: 'MCP-Infrastructure' }, { Key: 'Environment', Value: parameters.environment || 'development' }, ], }); const response = await dynamoDBClient.send(command); logger.info(`Created DynamoDB table: ${tableName}`); return { tableName, details: response.TableDescription }; } catch (error) { logger.error('Error creating DynamoDB table:', error); throw error; } } async deleteTable(tableName: string) { try { const command = new DeleteTableCommand({ TableName: tableName, }); await dynamoDBClient.send(command); logger.info(`Deleted DynamoDB table: ${tableName}`); return { success: true }; } catch (error) { logger.error('Error deleting DynamoDB table:', error); throw error; } } async getTableStatus(tableName: string) { try { const command = new DescribeTableCommand({ TableName: tableName, }); const response = await dynamoDBClient.send(command); // Corrected: Access Table property directly return response.Table; // } catch (error) { logger.error('Error getting table status:', error); throw error; } } }

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/gesguerra-wzln/aws-mcp-infrastucture'

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