You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I run instance-connect with --profile I get this error:
cnquery run aws ec2 instance-connect ec2-user@i-08db02ceb047ea7fb --profile AdministratorAccess-1234567890 --region eu-central-1 -c 'asset{ name title ids platform }'
! CLI pre-processing encountered an issue error="unknown flag: --profile"
! using builtin provider for aws
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
→ no AWS region found, using us-east-1
FTL failed to run query error="operation error STS: GetCallerIdentity, exceeded maximum number of attempts, 3, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, exceeded maximum number of attempts, 3, request send failed, Get \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\": dial tcp 169.254.169.254:80: i/o timeout"
Using the was CLI works:
aws ec2-instance-connect ssh --instance-id i-08db02ceb047ea7fb --region eu-central-1 --profile AdministratorAccess-1234567890
The authenticity of host '3.71.8.75 (3.71.8.75)' can't be established.
ED25519 key fingerprint is SHA256:yBfOVxhFjUtRSH37CZ27x3TUWYKvNzsaK71mJF8AgBI.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '3.71.8.75' (ED25519) to the list of known hosts.
, #_
~\_ ####_ Amazon Linux 2023
~~ \_#####\
~~ \###|
~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
[ec2-user@ip-172-31-21-20 ~]$
Setting the env var, it works independent of the --profile parameter:
export AWS_PROFILE=AdministratorAccess-1234567890
cnquery run aws ec2 instance-connect ec2-user@i-08db02ceb047ea7fb --region eu-central-1 -c 'asset{ name title ids platform }'
! CLI pre-processing encountered an issue error="unknown flag: --region"
! using builtin provider for aws
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
→ no AWS region found, using us-east-1
! using builtin provider for os
asset: {
title: "Amazon Linux 2023"
platform: "amazonlinux"
ids: [
0: "//platformid.api.mondoo.app/hostname/ip-172-31-21-20.eu-central-1.compute.internal"
]
name: "ip-172-31-21-20.eu-central-1.compute.internal"
}
To Reproduce
Steps to reproduce the behavior:
Create new EC2 instance
Set up an AWS profile
Try instance-connect with this profile
Note the error
Expected behavior
The parameter should set the profile.
The text was updated successfully, but these errors were encountered:
ohh, it looks like those creds get put in ~/.aws/config...ill take a look at this, i would have expected the api to read it in both locations if it puts sso stuff in ~/.aws/config ...maybe there's an extra option we need to pass
Describe the bug
When I run
instance-connect
with--profile
I get this error:Using the was CLI works:
Setting the env var, it works independent of the
--profile
parameter:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The parameter should set the profile.
The text was updated successfully, but these errors were encountered: