Here is my suggestion and a way to verify it:
I am using SSO with the profile name ATeam. You will need to update this accordingly in your config and credentials files.
Create the instance:
aws ec2 run-instances \
--image-id ami-0578f2b35d0328762 \
--instance-type t2.micro \
--security-group-ids sg-065d064965244f9a0 \
--subnet-id subnet-00d93c6b00c0a6ccb \
--key-name devass \
--user-data file://ec2-user-data-web-app.md \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=pub_1},{Key=Group,Value=devass},{Key=LifeCycle,Value=development}]' \
--count 1 \
--profile ATeam
Verify the important instance information, Sorry, the query needs to be placed on one line as I have not discovered a way to break it down to multiple lines.
aws ec2 describe-instances --query "Reservations[*].Instances[*].{Instance:InstanceId,PublicIP:PublicIpAddress,Name:Tags[?Key=='Name']|[0].Value,Group:Tags[?Key=='Group']|[0].Value,LifeCycle:Tags[?Key=='LifeCycle']|[0].Value,Status:State.Name}" \
--profile ATeam \
--output table
Result:
Console Output for describe-instances