and changed the way we leverage public clouds and how we write, deploy and maintain applications. A great way to combine the two paradigms is to build a voice assistant with based on functions -written in - to deploy a cluster on . Serverless Containers Alexa Lambda Go Docker Swarm AWS The figure below shows all components needed to deploy a production-ready Swarm cluster on AWS with Alexa. Note: Full code is available on my . GitHub A user will ask to deploy a Swarm Cluster: Amazon Echo will intercept the user’s voice command with built-in natural language understanding and speech recognition. Convey them to the service. A custom Alexa skill will convert the voice commands to intents: Echo Alexa The will trigger a Lambda function for intent fulfilment: Alexa skill The Lambda Function will use the to deploy a fleet of EC2 instances from an with preinstalled (I used to bake the AMI to reduce the cold-start of the instances). Then, push the cluster IP addresses to a SQS: AWS EC2 API AMI Docker CE Packer Next, the function will insert a new item to a table with the current state of the cluster: DynamoDB Once the received the message, a (it monitors the parameter) will be triggered and as a result it will publish a message to an : SQS CloudWatch alarm ApproximateNumberOfMessagesVisible SNS topic The topic triggers a subscribed Lambda function: SNS The function will pull the queue for a new cluster and use the to provision a Swarm cluster on the fleet of EC2 instances created earlier: Lambda AWS System Manager API For debugging, the function will output the to : Swarm Token CloudWatch Finally, it will update the item state from to _Done_and delete the message from SQS. DynamoDB Pending You can test your skill on your Amazon Echo, Echo Dot, or any Alexa device by saying, “ ” Alexa, open Docker At the end of the workflow described above, a will be created: Swarm cluster At this point you can see your Swarm status by firing the following command as shown below: Improvements & Limitations: execution timeout if the cluster size is huge. You can use a Lambda function to spawn child Lambda. Lambda Master & parts can be deleted if SQS is supported as Lambda event source (AWS PLEAAASE !). or cannot be used to notify Lambda as I wanted to create some kind of for the instances to be fully created before setting up the Swarm cluster. (maybe ?) CloudWatch SNS DynamoDB streams Kinesis streams delay Simple Workflow Service Inject before . SNS can add the message to SQS and trigger the function. We won’t need CloudWatch Alarm. SNS SQS Lambda You can improve the Skill by adding new custom intents to deploy on the cluster or ask Alexa to deploy the cluster on a … Docker containers VPC In-depth details about the skill can be found on my GitHub . Make sure to drop your comments, feedback, or suggestions below — or connect with me directly on Twitter @ mlabouardy .