AWS Slack Chatbot

From SWKLS WIKI
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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