Skip to main content
Glama

AWS MCP Infrastructure

s3.service.ts•1.53 kB
import { CreateBucketCommand, DeleteBucketCommand, PutBucketTaggingCommand } from '@aws-sdk/client-s3'; import { s3Client } from '../../config/aws.config'; import { logger } from '../../utils/logger'; export class S3Service { async createBucket(parameters: any) { try { const bucketName = parameters.bucketName || `mcp-bucket-${Date.now()}`; const command = new CreateBucketCommand({ Bucket: bucketName, CreateBucketConfiguration: { LocationConstraint: parameters.region || process.env.AWS_REGION, }, }); await s3Client.send(command); const taggingCommand = new PutBucketTaggingCommand({ Bucket: bucketName, Tagging: { TagSet: [ { Key: 'CreatedBy', Value: 'MCP-Infrastructure' }, { Key: 'Environment', Value: parameters.environment || 'development' }, ], }, }); await s3Client.send(taggingCommand); logger.info(`Created S3 bucket: ${bucketName}`); return { bucketName }; } catch (error) { logger.error('Error creating S3 bucket:', error); throw error; } } async deleteBucket(bucketName: string) { try { const command = new DeleteBucketCommand({ Bucket: bucketName, }); await s3Client.send(command); logger.info(`Deleted S3 bucket: ${bucketName}`); return { success: true }; } catch (error) { logger.error('Error deleting S3 bucket:', 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