s3_object_upload
Upload files to Amazon S3 buckets using base64-encoded content. Specify bucket name, object key, and file content for cloud storage management.
Instructions
Upload an object to S3
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket_name | Yes | Name of the S3 bucket | |
| object_key | Yes | Key/path of the object in the bucket | |
| file_content | Yes | Base64 encoded file content for upload |
Implementation Reference
- src/mcp_server_aws/server.py:155-159 (handler)Executes the S3 object upload by decoding base64 file content and using boto3 s3_client.upload_fileobj to upload to the specified bucket and key.elif name == "s3_object_upload": response = s3_client.upload_fileobj( io.BytesIO(base64.b64decode(arguments["file_content"])), arguments["bucket_name"], arguments["object_key"])
- src/mcp_server_aws/tools.py:42-63 (schema)Defines the Tool object with input schema for s3_object_upload, specifying required parameters: bucket_name, object_key, and base64-encoded file_content.Tool( name="s3_object_upload", description="Upload an object to S3", inputSchema={ "type": "object", "properties": { "bucket_name": { "type": "string", "description": "Name of the S3 bucket" }, "object_key": { "type": "string", "description": "Key/path of the object in the bucket" }, "file_content": { "type": "string", "description": "Base64 encoded file content for upload" } }, "required": ["bucket_name", "object_key", "file_content"] } ),
- src/mcp_server_aws/server.py:136-140 (registration)Registers the s3_object_upload tool (among others) by returning the list from get_aws_tools() in response to list_tools() calls.async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()