1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 16:18:00 +00:00

[aws] Improve filtering at aws_ssm_session_any()

This commit is contained in:
Daniel Carrillo 2019-11-08 19:44:43 +01:00
parent 048d5302d6
commit b9c34d9445

View File

@ -101,7 +101,7 @@ function aws_ssm_session_any {
fi
id=$(aws ec2 describe-instances --profile $profile --output text \
--filter "Name=tag-value,Values=$1" "Name=instance-state-name,Values=running" \
--filter "Name=tag:Name,Values=$1" "Name=instance-state-name,Values=running" \
--query 'Reservations[0].Instances[0].InstanceId')
if [[ $2 == "ssh" ]]; then
AWS_PROFILE=$profile ssh $id