gpt4 book ai didi

amazon-web-services - 如何建立 AWs Systems Manager PortForwarding session ?未知 session 类型端口

转载 作者:行者123 更新时间:2023-12-04 08:11:20 30 4
gpt4 key购买 nike

我正在尝试执行 AWS Systems Manager Session Manager Port Forwarding session 的 POC,但即使启动正常 session 工作,我似乎也无法启动 PortForwarding session 。

session 开始并按预期工作
aws ssm 开始 session --target i-xxxxxxxxxxx

aws ssm start-session --target i-xxxxxxxxxxx \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["80"],"localPortNumber":["3001"]}'

IAM 角色具有 AWS 策略 AmazonSSMManagedInstanceCore 和 session 管理器策略
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"s3:GetEncryptionConfiguration"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"kms:Decrypt"
],
"Resource": "arn:aws:kms:us-east-2:xxxxxxxxxxx:key/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx"
}
]
}

我希望 session 建立隧道并开始将端口 80 转发到我的本地端口 3001

相反,我收到以下错误:
SessionId xxxx-xxxxxxxxxxx

----------ERROR-------
Encountered error while initiating handshake. SessionType failed on client with status 2 error: Failed to process action SessionType: Unknown session type Port```

Here is what I am trying to accomplish:

https://aws.amazon.com/blogs/aws/new-port-forwarding-using-aws-system-manager-sessions-manager/

最佳答案

我遇到了同样的问题,结果证明它是用于 aws cli 的过时的 AWS session 管理器插件。更新插件后,它工作了。

安装/更新插件的说明是 here .

关于amazon-web-services - 如何建立 AWs Systems Manager PortForwarding session ?未知 session 类型端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58509844/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com