{"id":13509975,"url":"https://github.com/mlabouardy/alexa-swarm","last_synced_at":"2025-04-12T20:52:39.510Z","repository":{"id":79849183,"uuid":"112020383","full_name":"mlabouardy/alexa-swarm","owner":"mlabouardy","description":"Deploy a Docker Swarm cluster on AWS :cloud: using Amazon Echo","archived":false,"fork":false,"pushed_at":"2018-04-22T15:47:33.000Z","size":3061,"stargazers_count":15,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T20:52:34.035Z","etag":null,"topics":["alexa","alexa-skill","aws","containers","docker","echo","faas","lambda","serverless","swarm"],"latest_commit_sha":null,"homepage":"","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/mlabouardy.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}},"created_at":"2017-11-25T17:04:50.000Z","updated_at":"2024-10-01T20:25:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"316ea26b-a383-4dea-94fa-3a17630db3d0","html_url":"https://github.com/mlabouardy/alexa-swarm","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/mlabouardy%2Falexa-swarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabouardy%2Falexa-swarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabouardy%2Falexa-swarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabouardy%2Falexa-swarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlabouardy","download_url":"https://codeload.github.com/mlabouardy/alexa-swarm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631728,"owners_count":21136560,"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":["alexa","alexa-skill","aws","containers","docker","echo","faas","lambda","serverless","swarm"],"created_at":"2024-08-01T02:01:19.500Z","updated_at":"2025-04-12T20:52:39.490Z","avatar_url":"https://github.com/mlabouardy.png","language":"Go","funding_links":[],"categories":["Go","aws"],"sub_categories":[],"readme":"Deploy a Production-Ready Docker Swarm Cluster on AWS with Alexa.\r\n\r\n# How it works\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"schema.png\" /\u003e\r\n\u003c/p\u003e\r\n\r\n# Lambda Functions\r\n\r\n## Infrastructure Lambda Function\r\n\r\n### IAM Role\r\n\r\n```\r\n{\r\n    \"Version\": \"2012-10-17\",\r\n    \"Statement\": [\r\n        {\r\n            \"Sid\": \"1\",\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"iam:PassRole\",\r\n                \"dynamodb:PutItem\",\r\n                \"sqs:SendMessage\",\r\n                \"sqs:SetQueueAttributes\"\r\n            ],\r\n            \"Resource\": [\r\n                \"arn:aws:sqs:AWS_REGION:ACCOUNT_ID:QUEUE_NAME\",\r\n                \"arn:aws:iam::ACCOUNT_ID:role/SSM_ROLE_NAME\",\r\n                \"arn:aws:dynamodb:AWS_REGION:ACCOUNT_ID:table/TABLE_NAME\"\r\n            ]\r\n        },\r\n        {\r\n            \"Sid\": \"2\",\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"logs:CreateLogStream\",\r\n                \"ec2:CreateTags\",\r\n                \"ec2:RunInstances\",\r\n                \"logs:CreateLogGroup\",\r\n                \"logs:PutLogEvents\"\r\n            ],\r\n            \"Resource\": \"*\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n### Environment Variables\r\n\r\n| Name | Description |\r\n| ---- | ----------- |\r\n| AMI  | Amazon Machine Image ID with Docker CE pre-installed |\r\n| KEYPAIR | AWS SSH KeyPair |\r\n| SSM_ROLE_NAME | IAM Role with SSM permissions for EC2 instances |\r\n| SECURITY_GROUP | Security Group ID that allows inbound traffic on 2377/tcp and 22/tcp |\r\n| SQS_URL | SQS URL |\r\n| TABLE_NAME | DynamoDB Table name |\r\n\r\n## Swarm Lambda Function\r\n\r\n### IAM Role\r\n\r\n```\r\n{\r\n    \"Version\": \"2012-10-17\",\r\n    \"Statement\": [\r\n        {\r\n            \"Sid\": \"1\",\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"sqs:DeleteMessage\",\r\n                \"sqs:ReceiveMessage\",\r\n                \"dynamodb:UpdateItem\"\r\n            ],\r\n            \"Resource\": [\r\n                \"arn:aws:sqs:AWS_REGION:ACCOUNT_ID:QUEUE_NAME\",\r\n                \"arn:aws:dynamodb:AWS_REGION:ACCOUNT_ID:table/TABLE_NAME\"\r\n            ]\r\n        },\r\n        {\r\n            \"Sid\": \"2\",\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"ssm:SendCommand\",\r\n                \"logs:CreateLogStream\",\r\n                \"logs:CreateLogGroup\",\r\n                \"logs:PutLogEvents\",\r\n                \"ssm:GetCommandInvocation\"\r\n            ],\r\n            \"Resource\": \"*\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n### Environment Variables\r\n\r\n| Name | Description |\r\n| ---- | ----------- |\r\n| SQS_URL | SQS URL |\r\n| TABLE_NAME | DynamoDB Table name |\r\n\r\n# Going further\r\n\r\n* Cleanup a Swarm Cluster\r\n* Deploy Docker Containers\r\n* Deploy Swarm in private VPC\r\n* Change Instance Type\r\n* Deploy with multiple Swarm managers\r\n* etc\r\n\r\n# Licence\r\n\r\nMIT\r\n\r\n# Maintainers\r\n\r\n* Mohamed Labouardy \u003cmohamed@labouardy.com\u003e\r\n\r\n# Tutorial\r\n\r\n* [Deploy a Swarm Cluster with Alexa](http://www.blog.labouardy.com/deploy-a-swarm-cluster-with-alexa/)\r\n\r\n[![Deploy a Swarm Cluster with Alexa](https://img.youtube.com/vi/Bd63NFmjLAo/0.jpg)](https://www.youtube.com/watch?v=Bd63NFmjLAo)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabouardy%2Falexa-swarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlabouardy%2Falexa-swarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabouardy%2Falexa-swarm/lists"}