AWS SSM Hybrid Activation for windows instances in Azure

0

Hi,

I have enabled AWS SSM hybrid activation for my azure windows instances.

The hybrid activation has IAM role attached with some permission like s3, etc.

the registration is successful and the azure instance is also reflected in AWS SSM fleet manager.

But from the windows instances, if I try to do

aws s3 ls

it gives

aws sts get-caller-identity aws : At line:1 char:1

  • aws sts get-caller-identity
  • CategoryInfo : NotSpecified: (:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

<botocore.awsrequest.AWSRequest object at 0x0000020382F109D0>

but the azure linux instances is able to use the temporary creds generated by the IAM role attached to hybrid activation. Any idea, what I might be missing?

질문됨 7달 전398회 조회
2개 답변
0

Which user do you use in Windows instance? If you completed your activation process with Administrator (e.g., PowerShell in elevated mode), then the credential for the IAM role should only be available for the Administrator.

profile picture
HS
답변함 7달 전
profile picture
전문가
검토됨 7달 전
  • I did the activation using the administrator mode, but then also if I try

    aws s3 ls

    from powershell in administrator mode, it gives

    <botocore.awsrequest.AWSRequest object at 0x000001CD8BAF8AD0>

  • aws s3 ls command without a --profile option will use default profile as a default. Can you check the credential and config files (e.g., C:\Users\Administrator\.aws\credentials, C:\Users\Administrator\.aws\config) and see which profile was installed by your activation script? If the profile was not default, you should use the command with the --profile option instead (e.g., aws s3 ls --profile profile_name).

0

got it working, for some strange reason the .aws folder gets created in

C:\Windows\System32\config\systemprofile\.aws\credentials

so I have to pass

$env:AWS_SHARED_CREDENTIALS_FILE = "C:\Windows\System32\config\systemprofile\.aws\credentials"

then run

aws s3 ls --profile default --region <AWS_REGION>

답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠