From bca85497f87757ed1d00ed1b8cf18069c9cc35ec Mon Sep 17 00:00:00 2001 From: dcarrillo Date: Thu, 6 Feb 2020 19:48:22 +0100 Subject: [PATCH] [aws] Add a (dirty) function for showing cloudfront distributions --- modules/aws/init.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/aws/init.zsh b/modules/aws/init.zsh index 6bc5c12..1daa4d6 100644 --- a/modules/aws/init.zsh +++ b/modules/aws/init.zsh @@ -110,6 +110,14 @@ function aws_ssm_session_any { fi } +function aws_cf { + local profile=$(_get_aws_profile) + + aws cloudfront list-distributions --profile $profile --output ${_aws_output} \ + --query "DistributionList.Items[*].{id:Id,domain:DomainName,status:Status, + origin:Origins.Items[].DomainName | join(' ', @), aliases:Aliases.Items | join(' ', @)}" +} + # ~/.ssh/config # # Host i-*