amazon-web-services - 在 MAC 上使用 AWS CLI 启动 Web 服务器时出现问题
问题描述
I am in the early stages in Learning AWS. i face this problem when trying to Launch web server using AWS CLI using on MAC
I'm doing this to connect to the ec2 instance in created.
After running the command
# Set the Region
AZ=`curl -s http://169.254.169.254/latest/meta-data/placement/availability- zone`
export AWS_DEFAULT_REGION=${AZ::-1}
# Obtain latest Linux AMI
#AMI=$(aws ssm get-parameters --names /aws/service/ami-amazon-linux- latest/amzn2-ami-hvm-x86_64-gp2 --query
'Parameters[0].https://forums.aws.amazon.com /' --output text) echo $AMI # end I GET THIS MESSAGE
Provided region_name '<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html' doesn't match a supported format.
any suggestions?
解决方案
作为初学者,我认为您还应该考虑在深入了解 CLI 之前学习如何使用 AWS 控制台启动实例。
您可以查看本指南,该指南会指导您逐步了解如何使用控制台启动实例,同时考虑所有必要的要求: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted。 html
之后,您可以轻松使用 CLI:https ://docs.aws.amazon.com/cli/latest/userguide/cli-services-ec2-instances.html
您还可以使用上面的链接来帮助您解决错误。希望这会有所帮助:)
推荐阅读
- android - Android ExoPlayer “prepare()”到底是做什么的?
- nativescript-angular - 模拟器 xcode 无法正常工作:命令失败,退出代码为 65
- ftp - 调用未定义函数 ftp_ssl_connect()
- asp.net - 在不使用机器密钥的 ASP.NET 标识中替代 DpapiDataProtectionProvider
- maven - 我如何从外部项目文件夹启动 Maven 构建?
- azure-log-analytics - 如何使用 Log Analytics (KQL) 通过心跳跟踪 VM 可用性集(或可用区)的 SLA
- node.js - NodeJS net.Socket:`connect`与`ready`事件
- shell - tcpdump 不能使用带有 netcat 的反向 shell
- python - 从列表中删除空数据框并在第二个列表中删除相应的名称
- php - Laravel 资产路径问题