> For the complete documentation index, see [llms.txt](https://docs.lala.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lala.gg/awslightsail.md).

# AWS Lightsail使用教程

## 前言

由于AWS统一使用密钥进行登录，所以在您使用之前,您需要准备RSA公钥和私钥。如果您不知道如何生成，可以参看[这篇教程](https://blog.csdn.net/yiyu20180729/article/details/136371801)。

若您已经准备好了密钥，就可以开始使用了：

## 第一步：购买商品时，填入公钥

在[产品购买页](https://lala.gg/index.php/store/awslightsail)，在【附加信息】-【SSH Public Key】中填入您的公钥。购买后，服务器自动开通。

<figure><img src="/files/FvwcSXQ4j72pDygx0fZT" alt=""><figcaption></figcaption></figure>

## 第二步：查看ssh连接信息

<figure><img src="/files/ru6viyJnGjDmcfDUiUYS" alt=""><figcaption></figcaption></figure>

点击【Connection Details】查看服务器连接信息：

<figure><img src="/files/pYoBtB6XrpYJPnOLJSEn" alt=""><figcaption></figcaption></figure>

使用这里的ip，用户名，以及您自己的私钥进行登录。不同系统用户名不一样，请注意。

## 第三步：配置防火墙

点击Firewall，进行防火墙配置：

<figure><img src="/files/MuWXAPDdqvbiCsMCVeag" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
我们建议仅开放您需要的入站端口。
{% endhint %}

{% hint style="warning" %}
如果您不指定Source IP，请留空（留空代表允许所有来源的连接，请不要填写0.0.0.0/0）
{% endhint %}

***

## 常见问题

### Q：可以更换ip吗？如何更换？

{% hint style="info" %}
当您在购买产品的时候没有勾选静态ip，则可以更换ip。具体操作为：在服务器管理控制面板上关闭机器，然后重新开机，机器ip就会更改。但是，如果购买产品的时候勾选了静态ip，则无法通过这个方式更换ip，请发工单联系客服处理。
{% endhint %}

### Q：为什么我的机器频繁被关机？

{% hint style="info" %}
这说明您的机器使用流量超过了额度，请等待次月初1日流量恢复后再开机使用。
{% endhint %}

特别注意，aws可用流量计算公式为：

套餐额定流量/ 30✖月可使用天数 \* (1 + 可超流比例)，例如：

当月10号开机一台1000G流量的aws机器，若可超流比例为40%，那么当月可使用流量为：

1000G /30 \* 20天 \* （1+40%）= 933G，

次月及以后月份可用流量为：1000G /30 \* 30天 \* （1+40%）= 1400G

### Q：如何得知我的机器能超多少流量？

{% hint style="info" %}
由于aws每个地区的流量是独立的，所以每个区的情况都不同，可超流比例也不一样，而且会根据每个月情况动态调整，若您仍然想知道，请联系客服获取。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lala.gg/awslightsail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
