AWS Slack Chatbot

From SWKLS WIKI
Revision as of 15:53, 23 October 2020 by Unknown user (talk) (→‎AWS Chatbot Command Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

AWS Chatbot Command Examples

The AWS Chatbot in Slack is limited to informational queries. For example, you cannot reboot a LightSail instance via the AWS Chatbot. The JSON output will be slightly different to that of the normal AWS CLI. This is important to note as the inputs in the --query area may be different than expected. For example, AWS Chatbot may show 'PublicIpAddress' while the AWS CLI show 'publicIpAddress' (the word 'public' is capitalized when accessing AWS Chatbot).

LightSail

List Instance Names

@aws lightsail get-instances --query Instances[*].Name --region us-east-1

List Instance Names - Extended Information

@aws lightsail get-instances --query Instances[*].[Name,PublicIpAddress,BlueprintId] --region us-east-1

List Single Instance Info

@aws lightsail get-instance --instance-name swkls-sandbox-nano