{"id":20328987,"url":"https://github.com/affix/openfaas-sqs-connector","last_synced_at":"2025-04-11T20:41:17.778Z","repository":{"id":64305191,"uuid":"181155616","full_name":"affix/openfaas-sqs-connector","owner":"affix","description":"An SQS Connector for OpenFaaS","archived":false,"fork":false,"pushed_at":"2020-01-21T15:33:48.000Z","size":295,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T16:46:22.204Z","etag":null,"topics":["aws","openfaas","openfaas-connector","sqs-consumer"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/affix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-13T10:36:36.000Z","updated_at":"2021-03-11T06:47:45.000Z","dependencies_parsed_at":"2023-01-15T10:30:24.569Z","dependency_job_id":null,"html_url":"https://github.com/affix/openfaas-sqs-connector","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affix%2Fopenfaas-sqs-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affix%2Fopenfaas-sqs-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affix%2Fopenfaas-sqs-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affix%2Fopenfaas-sqs-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/affix","download_url":"https://codeload.github.com/affix/openfaas-sqs-connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248478686,"owners_count":21110748,"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","openfaas","openfaas-connector","sqs-consumer"],"created_at":"2024-11-14T20:08:57.363Z","updated_at":"2025-04-11T20:41:17.751Z","avatar_url":"https://github.com/affix.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## openfaas-sqs-connector\n\nThe SQS connector connects OpenFaaS functions to AQS SQS Queues.\n\nGoals:\n\n* Allow functions to subscribe to SQS Queues\n* Ingest data from sidekiq and execute functions\n* Work with the OpenFaaS REST API / Gateway\n* Formulate and validate a generic \"connector-pattern\" to be used for various event sources like sidekiq, AWS SNS, RabbitMQ etc\n\n## Try it out\n\n### Deploy Swarm\n\nDeploy the stack which contains sidekiq and the connector:\n\n```bash\ndocker stack deploy sidekiq -c ./yaml/connector-swarm.yml\n```\n\n* Deploy or update a function so it has an annotation `topic=faas-request` or some other topic\n\nAs an example:\n\n```shell\n$ faas store deploy figlet --annotation topic=\"faas-request\"\n```\n\nThe function can advertise more than one topic by using a comma-separated list i.e. `topic=topic1,topic2,topic3`\n\n* Publish some messages to the topic in question i.e. `faas-request`\n\nInstructions are below for publishing messages\n\n* Watch the logs of the sidekiq-connector\n\n\n### Deploy on Kubernetes\n\nThe following instructions show how to run `openfaas-sqs-connector` on Kubernetes.\n\nDeploy a function with a `topic` annotation:\n\n```bash\n$ faas store deploy figlet --annotation topic=\"faas-request\" --gateway \u003cfaas-netes-gateway-url\u003e\n```\n\nOur deployment relies on a secret called aws-secret so lets create a secret\n\n```bash\nkubectl create secret generic aws-credentials --from-literal=AWS_ACCESS_KEY_ID=\u003cACCESS_KEY\u003e --from-literal=AWS_SECRET_ACCESS_KEY_ID=\u003cSECRET_KEY\u003e --from-literal=AWS_REGION=\u003cREGION\u003e\n\n```\n\nNow deploy the connector\n\n```bash\nkubectl apply -f ./yaml/kubernetes/connector-dep.yml\n```\n\n## Configuration\n\nThis configuration can be set in the YAML files for Kubernetes or Swarm.\n\n| env_var               | description                                                 |\n| --------------------- |----------------------------------------------------------   |\n| `AWS_ACCESS_KEY_ID`      | AWS Access Key ID for IAM User    |\n| `AWS_ACCESS_SECRET_KEY_ID`      | AWS Secret Access Key ID for IAM User    |\n| `AWS_REGION`            | AWS Region, e.g eu-west-1   |\n| `AWS_SQS_QUEUE_NAME`    | SQS Queue for the functions                    |\n| `GATEWAY_URL`           | The URL for the API gateway i.e. http://gateway:8080 or http://gateway.openfaas:8080 for Kubernetes       |\n| `PRINT_RESPONSE`        | Default is `false` - this will output the response of calling a function in the logs |\n| `PRINT_RESPONSE_BODY`        | Default is `false` - this will output the response of calling a function in the logs |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faffix%2Fopenfaas-sqs-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faffix%2Fopenfaas-sqs-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faffix%2Fopenfaas-sqs-connector/lists"}