首页 > 解决方案 > 在 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?

标签: amazon-web-servicesamazon-s3amazon-ec2

解决方案


作为初学者,我认为您还应该考虑在深入了解 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

您还可以使用上面的链接来帮助您解决错误。希望这会有所帮助:)


推荐阅读