Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 调用DescribeInstances操作时发生错误(RequestExpired):在AWS cloud9上运行命令时,请求已过期_Amazon Web Services_Server_Port_Backend - Fatal编程技术网

Amazon web services 调用DescribeInstances操作时发生错误(RequestExpired):在AWS cloud9上运行命令时,请求已过期

Amazon web services 调用DescribeInstances操作时发生错误(RequestExpired):在AWS cloud9上运行命令时,请求已过期,amazon-web-services,server,port,backend,Amazon Web Services,Server,Port,Backend,当我运行以下shell脚本时,该脚本允许用户在aws中使用port80,错误或UC: MY_INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id) # Get the ID of the instance for the environment, and store it temporarily. MY_SECURITY_GROUP_ID=$(aws ec2 describe-instances --ins

当我运行以下shell脚本时,该脚本允许用户在aws中使用port80,错误或UC:

MY_INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id) # Get the ID of the instance for the environment, and store it temporarily.

MY_SECURITY_GROUP_ID=$(aws ec2 describe-instances --instance-id $MY_INSTANCE_ID --query 'Reservations[].Instances[0].SecurityGroups[0].GroupId' --output text) # Get the ID of the security group associated with the instance, and store it temporarily.

aws ec2 authorize-security-group-ingress --group-id $MY_SECURITY_GROUP_ID --protocol tcp --cidr 0.0.0.0/0 --port 80 # Add an inbound rule to the security group to allow all incoming IPv4-based traffic over port 80.

aws ec2 authorize-security-group-ingress --group-id $MY_SECURITY_GROUP_ID --ip-permissions IpProtocol=tcp,Ipv6Ranges='[{CidrIpv6=::/0}]',FromPort=80,ToPort=80 # Add an inbound rule to the security group to allow all incoming IPv6-based traffic over port 80.

MY_SUBNET_ID=$(aws ec2 describe-instances --instance-id $MY_INSTANCE_ID --query 'Reservations[].Instances[0].SubnetId' --output text) # Get the ID of the subnet associated with the instance, and store it temporarily.

MY_NETWORK_ACL_ID=$(aws ec2 describe-network-acls --filters Name=association.subnet-id,Values=$MY_SUBNET_ID --query 'NetworkAcls[].Associations[0].NetworkAclId' --output text) # Get the ID of the network ACL associated with the subnet, and store it temporarily.

aws ec2 create-network-acl-entry --network-acl-id $MY_NETWORK_ACL_ID --ingress --protocol tcp --rule-action allow --rule-number 10000 --cidr-block 0.0.0.0/0 --port-range From=80,To=80 # Add an inbound rule to the network ACL to allow all IPv4-based traffic over port 80. Advanced users: change this suggested rule number as desired.

aws ec2 create-network-acl-entry --network-acl-id $MY_NETWORK_ACL_ID --ingress --protocol tcp --rule-action allow --rule-number 10100 --ipv6-cidr-block ::/0 --port-range From=80,To=80 # Add an inbound rule to the network ACL to allow all IPv6-based traffic over port 80. Advanced users: change this suggested rule number as desired.
错误消息是:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    19  100    19    0     0   1266      0 --:--:-- --:--:-- --:--:--  1266
hello

An error occurred (RequestExpired) when calling the DescribeInstances operation: Request has expired.
hello
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --group-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --group-id: expected one argument

An error occurred (RequestExpired) when calling the DescribeInstances operation: Request has expired.

An error occurred (RequestExpired) when calling the DescribeNetworkAcls operation: Request has expired.
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --network-acl-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --network-acl-id: expected one argument


Process exited with code: 2

Pane is dead
%Total%接收到%x平均速度时间电流
数据加载上载总左速度
100    19  100    19    0     0   1266      0 --:--:-- --:--:-- --:--:--  1266
你好
调用DescribeInstances操作时发生错误(RequestExpired):请求已过期。
你好
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:参数--组id:应为一个参数
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:参数--组id:应为一个参数
调用DescribeInstances操作时发生错误(RequestExpired):请求已过期。
调用DescribeNetworkAcls操作时发生错误(RequestExpired):请求已过期。
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:参数--网络acl id:应为一个参数
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:参数--网络acl id:应为一个参数
进程已退出,代码为:2
窗格死了

我已经在一个新的环境中尝试了这段代码,它没有任何问题,我的系统出了什么问题?如何修复它?

您能否详细说明一下
允许用户在aws中使用port80
我必须打开一个新的shell并在其中输入
aws\u访问密钥ID
aws\u秘密访问密钥
,以及
aws\u会话令牌
。由于某些原因,他们没有在我打开的shell中工作。您可以详细说明
允许用户在aws中使用port80
我必须打开一个新的shell,并在其中输入
aws\u ACCESS\u KEY\u ID
aws\u SECRET\u ACCESS\u KEY
aws\u SESSION\u TOKEN
。由于某种原因,它们没有在我打开了一段时间的外壳中工作