Slack Bot for ECS Service Deployment and get Instance IDs.
@<bot-user-name> : ECS deploy interactive menu
@<bot-user-name> <instance name prefix> : Return instance Ids
- serverless >=1.39.x
- Go >=1.1
-
Create Slack bot user
-
Create conf yaml file for serverless.yml
$ cp conf/stage.yml.sample conf/YOUR-STAGE-NAME.yml
- How to Get slack token
- Verification Token
- Axxxxxx is your slack bot's App ID
- https://api.slack.com/apps/Axxxxxx
- App Credentials
- Bot User OAuth Access Token
- Verification Token
- How to Get slack token
-
Deploy to AWS
-
YOUR-STAGE-NAME
is needed to match env yaml file name you created before.$ sls deploy -v --stage YOUR-STAGE-NAWE
-
-
Configure Slack Event Subscriptions
-
Configure Interactive Components
- https://api.slack.com/apps/Axxxxx/interactive-messages
- Set your API Gateway endpoint to
Request URL
(Seesls deploy
output) same as 4. - Other settings is not required
-
Encrypt Slack tokens set with lambda's environment variable