> ## Content Index
> Fetch the complete content index at: https://www.albert-yu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 2020ironman 12th – Modern Web – Day09 – Amazon Lightsail 轉 AWS EC2
- URL: https://www.albert-yu.com/blog/2020ironman-12th-modern-web-day09-lightsail-to-ec2/
- Published: 2020-09-22T16:00:04.000Z
- Updated: 2026-10-30T03:43:22.000Z
- Author: Albert Yu
- Tags: 2020ironman 12th – Modern Web - PHP on AWS 進化論 - 從單主機一路進化到Serverless，以WordPress與 laravel 為例 (中斷), Ithome鐵人賽

## 為何要轉換？

AWS 官方說明 [<-連結->](https://aws.amazon.com/tw/lightsail/faq/?ref=albert-yu.com#Upgrade%5Fto%5FEC2)

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-01.png)

其實就主機資源這件事情是最容易理解的

但就真實應用情境上來說

如果你希望有真實的網路環境使用

可以建立真正的私有網段或者是控制路由等等的功能

Lightsail是無法協助的

因為他的VPC是簡約版的

如果需要完整的周邊功能比如控制路由或與AWS其他幾百項的服務完整結合都還是要轉換到EC2的

## 轉換方式

轉換方式是由主機產生Snapshot再將這個轉換成AWS EC2 AMI

所以主機一定是需要一段時間停機的

製作方式只要進到主機的控制介面中切換至Snapshots就可以看到『Create snapshot』的按鈕了

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-02.png)

這時候點選『Create snapshot』後輸入名稱及點選Create即可產生snapshot

要注意點選Create後會有一瞬間主機會是暫停的狀況來產生快照

會發生SSH斷線或者服務連不到的狀況幾秒

如果你的環境不能當下不能停機要注意這狀況喔

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-03.png)

建立過程需要數分鐘(等待)

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-04.png)

建立完成

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-05.png)

點選右邊的點點就可以看到

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-06.png)

點選『Export to Ec2』

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-07.png)

確認轉換

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-08.png)

告警頁面

這邊資訊很重要因為用這邊開啟的主機如果有用過SSH登入會殘留原先的key

建議建立EC2後要刪除

刪除方式如連結文章下半段 [<--連結-->](https://lightsail.aws.amazon.com/ls/docs/en%5Fus/articles/amazon-lightsail-securing-linux-unix-amazon-ec2-instances?ref=albert-yu.com)

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-09.png)

## 如何找到該AMI

進到AWS登入後的首頁進入EC2

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-10.png)

點選『AMIs』選擇『Owned by me』尋找與Lightsail snapshot 同名的『AMI Name』

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day09-amazon-lightsail-zhuan-aws-ec2-11.png)

這樣就可以開始建立AWS EC2了