Skip to main content
Glama

dynamodb_update_ttl

Configure Time to Live (TTL) settings for DynamoDB tables to automatically expire items after a specified duration, managing data lifecycle and storage costs.

Instructions

Update the TTL settings for a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesName of the DynamoDB table
ttl_enabledYesWhether TTL should be enabled
ttl_attributeYesThe attribute name to use for TTL

Implementation Reference

  • The core handler logic for the 'dynamodb_update_ttl' tool, which invokes the AWS DynamoDB client's update_time_to_live method with the provided table name, TTL enabled status, and attribute.
    elif name == "dynamodb_update_ttl": response = dynamodb_client.update_time_to_live( TableName=arguments["table_name"], TimeToLiveSpecification={ 'Enabled': arguments["ttl_enabled"], 'AttributeName': arguments["ttl_attribute"] } )
  • Input schema and Tool definition for 'dynamodb_update_ttl', specifying parameters: table_name (string), ttl_enabled (boolean), ttl_attribute (string).
    Tool( name="dynamodb_update_ttl", description="Update the TTL settings for a table", inputSchema={ "type": "object", "properties": { "table_name": { "type": "string", "description": "Name of the DynamoDB table" }, "ttl_enabled": { "type": "boolean", "description": "Whether TTL should be enabled" }, "ttl_attribute": { "type": "string", "description": "The attribute name to use for TTL" } }, "required": ["table_name", "ttl_enabled", "ttl_attribute"] } ),
  • Tool registration via the MCP list_tools handler, which returns get_aws_tools() containing the 'dynamodb_update_ttl' Tool object.
    async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()

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/rishikavikondala/mcp-server-aws'

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