{"id":22415922,"url":"https://github.com/thales-eduardo/aws_sns","last_synced_at":"2026-04-13T23:32:05.344Z","repository":{"id":225014849,"uuid":"763538209","full_name":"Thales-Eduardo/AWS_SNS","owner":"Thales-Eduardo","description":"Uma simples demonstração de funcionalidade do aws-sns. sem tratativa de idempotência","archived":false,"fork":false,"pushed_at":"2024-07-30T12:57:35.000Z","size":219,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T04:18:57.696Z","etag":null,"topics":["aws-sns","docker","nginx","nginx-proxy","terraform"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Thales-Eduardo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-26T13:39:09.000Z","updated_at":"2024-07-30T12:57:32.000Z","dependencies_parsed_at":"2024-02-28T21:47:59.907Z","dependency_job_id":"1dcd9ff2-00ff-4ca9-a6bb-348d5a1379be","html_url":"https://github.com/Thales-Eduardo/AWS_SNS","commit_stats":null,"previous_names":["thales-eduardo/aws_sns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Thales-Eduardo/AWS_SNS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thales-Eduardo%2FAWS_SNS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thales-Eduardo%2FAWS_SNS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thales-Eduardo%2FAWS_SNS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thales-Eduardo%2FAWS_SNS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thales-Eduardo","download_url":"https://codeload.github.com/Thales-Eduardo/AWS_SNS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thales-Eduardo%2FAWS_SNS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31775746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-sns","docker","nginx","nginx-proxy","terraform"],"created_at":"2024-12-05T15:14:09.936Z","updated_at":"2026-04-13T23:32:05.324Z","avatar_url":"https://github.com/Thales-Eduardo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS SNS\n\n\u003cdiv style=\"display: flex; justify-content: center; align-items: center; height: 100%; margin: 0;\"\u003e\n  \u003cdiv style=\"display: flex; width: 100%; height: 100%;\"\u003e\n      \u003cdiv style=\"flex: 1; display: flex; justify-content: center; align-items: center;\"\u003e\n          \u003cimg src=\"docs/sns.png\" alt=\"Imagem 1\" style=\"max-width: 100%; max-height: 100%;\"\u003e\n      \u003c/div\u003e\n      \u003cdiv style=\"flex: 1; display: flex; justify-content: center; align-items: center;\"\u003e\n          \u003cimg src=\"docs/esq.png\" alt=\"Imagem 2\" style=\"max-width: 90%; max-height: 90%;\"\u003e\n      \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n# Como Executar o Projeto\n\n- Ter o terraform instalado na sua maquina\n- Pegar sua chave ssh pública e adicionar no arquivo na pasta `terraform/vm`\n- Abrir o terminal e expor esses valores\n\n  - ```bash\n    export AWS_ACCESS_KEY_ID=\"sua key\"\n    export AWS_SECRET_ACCESS_KEY=\"sua secret\"\n\n    cd terraform/vm\n    terraform init\n    terraform fmt\n    terraform validate\n    terraform\n    terraform plan -out plan.out\n    terraform apply plan.out\n    ```\n\n- Acessar as vms e rodar todos os comandos do arquivo `script/vps.sh`\n- Pegar os ips das maquinas, adicionar no `resource` de `resoaws_sns_topic_subscription`\n  - ```bash\n      resource \"aws_sns_topic_subscription\" \"http_subscription_microservice1\" {\n        topic_arn = aws_sns_topic.sns.arn\n        protocol  = \"http\"\n        endpoint  = \"http://54.175.187.196\"\n      }\n      resource \"aws_sns_topic_subscription\" \"http_subscription_microservice2\" {\n        topic_arn = aws_sns_topic.sns.arn\n        protocol  = \"http\"\n        endpoint  = \"http://54.84.24.87\"\n      }\n    ```\n- Depois acessar a pasta terraform/sns e rodar esses comandos:\n  - ```bash\n      cd terraform/sns\n      terraform init\n      terraform fmt\n      terraform validate\n      terraform\n      terraform plan -out plan.out\n      terraform apply plan.out\n    ```\n- Pegar o ARN do tópico criado e adicionar o valor na variável de ambiente `TOPIC_ARN` no arquivo `.env`\n- verificar o log das vms, é acessar a url que estará no log, para se inscrever no tópico.\n- Acessar a pasta server e rodar a aplicação localmente.\n- Fazer as requisições para enviar as mensagens para o tópico\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthales-eduardo%2Faws_sns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthales-eduardo%2Faws_sns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthales-eduardo%2Faws_sns/lists"}