{"id":23176199,"url":"https://github.com/nexmo-community/messaging-aws-sqs-dynamodb-php","last_synced_at":"2026-03-08T12:38:27.853Z","repository":{"id":38147989,"uuid":"268854063","full_name":"nexmo-community/messaging-aws-sqs-dynamodb-php","owner":"nexmo-community","description":"AWS Lambda function created in PHP that once triggered, moves a message from SQS into DynamoDB.","archived":false,"fork":false,"pushed_at":"2025-02-04T09:26:29.000Z","size":73,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-01T06:03:12.442Z","etag":null,"topics":["aws","aws-dynamodb","aws-lambda","aws-sqs","bref","brefphp","dynamodb","lambda","lambda-functions","php","sqs","sqs-queue"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/nexmo-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","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}},"created_at":"2020-06-02T16:35:47.000Z","updated_at":"2023-09-13T19:48:46.000Z","dependencies_parsed_at":"2025-02-04T10:23:25.764Z","dependency_job_id":"5733ef98-2eab-49f2-b8ce-4132ebf5b46e","html_url":"https://github.com/nexmo-community/messaging-aws-sqs-dynamodb-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexmo-community%2Fmessaging-aws-sqs-dynamodb-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexmo-community%2Fmessaging-aws-sqs-dynamodb-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexmo-community%2Fmessaging-aws-sqs-dynamodb-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexmo-community%2Fmessaging-aws-sqs-dynamodb-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexmo-community","download_url":"https://codeload.github.com/nexmo-community/messaging-aws-sqs-dynamodb-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253863016,"owners_count":21975591,"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","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","aws-dynamodb","aws-lambda","aws-sqs","bref","brefphp","dynamodb","lambda","lambda-functions","php","sqs","sqs-queue"],"created_at":"2024-12-18T06:15:51.073Z","updated_at":"2026-03-08T12:38:27.798Z","avatar_url":"https://github.com/nexmo-community.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vonage/messaging-aws-sqs-dynamodb-php\n\nAWS Lambda function created in PHP that once triggered, moves a message from SQS into DynamoDB.\n\n## Prerequisites\n\n* PHP 7.4 (update `serverless.yml` for other versions)\n* Composer installed [globally](https://getcomposer.org/doc/00-intro.md#globally)\n* [Node.js](https://nodejs.org/en/) and npm\n* [Serverless Framework](https://serverless.com/framework/docs/getting-started/)\n* [AWS account](https://aws.amazon.com/)\n\n## Setup Instructions\n\nClone this repo from GitHub, and navigate into the newly created directory to proceed.\n\n### Use Composer to install dependencies\n\nThis example requires the use of Composer to install dependencies and set up the autoloader.\n\nAssuming a Composer global installation. [https://getcomposer.org/doc/00-intro.md#globally](https://getcomposer.org/doc/00-intro.md#globally)\n\n```\ncomposer install\n```\n\n### AWS Setup\n\nYou will need to create [AWS credentials](https://www.serverless.com/framework/docs/providers/aws/guide/credentials/) as indicated by `Serverless`.\n\nAlso, create a new [SQS queue](https://aws.amazon.com/sqs/) using the default settings. Make note of the ARN for later use.\n\nLastly, create a new [DynamoDB table](https://aws.amazon.com/dynamodb/) using the default settings. Make note of the table name and ARN for later use.\n\n\u003e Note: Ensure the primary key field name you set for the DynamoDB table matches the message ID in your SQS queue items. For this example we used `messageId`.\n\n### Update Environment\n\nRename the provided `config.yml.dist` file to `config.yml` and update the values as needed from `AWS` and `DynamoDB`, then save.\n\n```yaml\nAWS_REGION: us-east-1\nAWS_VERSION: latest\nAWS_DYNAMODB_TABLE_NAME:\nAWS_SQS_ARN:\nAWS_DYNAMODB_TABLE_ARN:\n```\n\n### Deploy to Lambda\n\nWith all the above updated successfully, you can now use `Serverless` to deploy the app to [AWS Lambda](https://aws.amazon.com/lambda/).\n\n```bash\nserverless deploy\n```\n\n### Invoke\n\nIf there are already messages in SQS, you can test the migration of these from `SQS` to `DynamoDB` by invoking the function by using `Serverless` locally:\n\n```bash\nserverless invoke -f sqstodynamo\n```\n\n\u003e Note: Above shows the use of function name `sqstodynamo` as specified in the default `serverless.yml` in this example.\n\nFor testing, you can add messages to `SQS` through the `AWS Console` website, or you can look at [this repo](https://github.com/nexmo-community/sms-aws-sqs-python-sender) for an example of how to add `SQS` messages through a typical `HTTP POST` request containing `JSON`.\n\n### Automate\n\nTo automate the usage of this function, you can add the newly created `Lambda` as a [Lambda Trigger](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-lambda-function-trigger.html) for your `SQS` instance.\n\nBy adding the trigger, it ensures that any new `SQS` messages call the `Lambda` function to automatically move the message to `DynamoDB`, therefore, removing the message from `SQS`.\n\n## Contributing\n\nWe love questions, comments, issues - and especially pull requests. Either open an issue to talk to us, or reach us on twitter: \u003chttps://twitter.com/VonageDev\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo-community%2Fmessaging-aws-sqs-dynamodb-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexmo-community%2Fmessaging-aws-sqs-dynamodb-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo-community%2Fmessaging-aws-sqs-dynamodb-php/lists"}