{"id":20471796,"url":"https://github.com/signiant/dynamodb-add-ttl-lambda","last_synced_at":"2025-10-13T16:09:05.585Z","repository":{"id":93380811,"uuid":"109388028","full_name":"Signiant/dynamodb-add-ttl-lambda","owner":"Signiant","description":"Lambda function to add a ttl attribute to an existing table based on an existing attribute","archived":false,"fork":false,"pushed_at":"2025-07-25T20:06:10.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-13T16:09:04.510Z","etag":null,"topics":["aws","dynamodb","ttl"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Signiant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-03T11:28:59.000Z","updated_at":"2025-07-25T20:06:14.000Z","dependencies_parsed_at":"2023-08-25T15:03:32.268Z","dependency_job_id":"b360a6f7-f76e-47ac-a27f-0dd0417c9739","html_url":"https://github.com/Signiant/dynamodb-add-ttl-lambda","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Signiant/dynamodb-add-ttl-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fdynamodb-add-ttl-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fdynamodb-add-ttl-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fdynamodb-add-ttl-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fdynamodb-add-ttl-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Signiant","download_url":"https://codeload.github.com/Signiant/dynamodb-add-ttl-lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fdynamodb-add-ttl-lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016060,"owners_count":26085798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","dynamodb","ttl"],"created_at":"2024-11-15T14:17:16.335Z","updated_at":"2025-10-13T16:09:05.577Z","avatar_url":"https://github.com/Signiant.png","language":"Python","readme":"# dynamodb-add-ttl-lambda\nLambda function to add a ttl attribute to an existing table based on an existing attribute\n\n[![Build Status](https://travis-ci.org/Signiant/dynamodb-add-ttl-lambda.svg?branch=master)](https://travis-ci.org/Signiant/dynamodb-add-ttl-lambda)\n\n# Purpose\nThis lambda function is designed to be used as a DynamoDB trigger in order to add a ttl attribute to an existing table for new rows.  It will base the new ttl attribute on an existing timestamp attibute by reading the existing attribute and adding a number of days to it.  The existing attribute, number of days and new ttl attribute name are all configurable\n\n# Installing\nThe easiest deployment of this solution is using AWS SAM\n* export your AWS credentials (or use --profile option with sam commands)\n* update the samconfig.toml file\n  * stack_name - name for the CFN stack\n  * region - if other than us-east-1\n  * parameter overrides\n    * ttlReferenceAttribute - existing attribute used to calculate TTL\n    * timeToLive - duration of TTL (in days)\n    * ttlAttributeName - what to name the TTL (e.g. ttl)\n    * tableName - the DynamoDB table to watch\n    * streamARN - the ARN of the DynamoDB stream for the table above\n* deploy the lambda using SAM: `./utils/deploy.sh default`\n\nThis should deploy the lambda and set up the associated dynamodb trigger for the appropriate table.\n\nNOTE: As per the StartingPosition property on the DynamoDB event trigger - this lambda will only process NEW records.\nYou may need a separate process to backfill existing records.\n\nYou can then monitor the stats for the function and the cloudwatch log to ensure TTLs are being added correctly for new rows.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fdynamodb-add-ttl-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigniant%2Fdynamodb-add-ttl-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fdynamodb-add-ttl-lambda/lists"}