Skip to content

Commit 10d9093

Browse files
committed
some updates
1 parent 26260c4 commit 10d9093

File tree

4 files changed

+4167
-4158
lines changed

4 files changed

+4167
-4158
lines changed

bin/ssm-by-name

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/bash
2+
[[ -z $1 ]] && echo "Must supply an instance name" && exit 1
3+
INSTANCE_ID=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$1" --output text --query 'Reservations[*].Instances[*].InstanceId')
4+
[[ -z $INSTANCE_ID ]] && echo "Could not find instance ID for $1" && exit 2
5+
echo Connecting to $INSTANCE_ID
6+
aws ssm start-session --target "$INSTANCE_ID"

0 commit comments

Comments
 (0)