Skip to content

Commit 11a0ef1

Browse files
authored
Remove "beta" banner on AWS page and minor improvements (hwdsl2#952)
- Remove "beta" banner - Update template file name to add "json" suffix - Use a python dictionary to store AMI info Co-authored-by: Scottpedia
1 parent ff38c87 commit 11a0ef1

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

aws/README-zh.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# 使用 CloudFormation 在 Amazon EC2 上部署(测试版)
1+
# 使用 CloudFormation 在 Amazon EC2 上部署
22

33
*其他语言版本: [English](README.md), [简体中文](README-zh.md).*
44

5-
> **注:** 此部署模板目前为 **测试版**,在使用时你可能会遇到错误。如果遇到问题,请创建一个新的 Issue。
6-
75
使用这个模板,你可以在 Amazon Elastic Compute Cloud(Amazon EC2)上快速搭建一个 IPsec VPN 服务器。在继续之前,请参见 EC2 [定价细节](https://aws.amazon.com/cn/ec2/pricing/on-demand/)。在部署中使用 `t2.micro` 服务器实例可能符合 [AWS 免费套餐](https://aws.amazon.com/cn/free/) 的资格。
86

97
可用的自定义参数:
@@ -20,7 +18,7 @@
2018
2119
确保使用 **AWS 账户根用户** 或者有 **管理员权限****IAM 用户** 部署此模板。
2220

23-
右键单击这个 [**模板链接**](https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/aws/cloudformation-template-ipsec),并将它保存到你的计算机上的一个新文件。然后在 ["创建堆栈" 向导](https://console.aws.amazon.com/cloudformation/home#/stacks/new)中将其作为模板源上传。
21+
右键单击这个 [**模板链接**](https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/aws/cloudformation-template-ipsec.json),并将它保存到你的计算机上的一个新文件。然后在 ["创建堆栈" 向导](https://console.aws.amazon.com/cloudformation/home#/stacks/new)中将其作为模板源上传。
2422

2523
![上传模板](upload-the-template.png)
2624

aws/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# Deploy to Amazon EC2 using CloudFormation (Beta)
1+
# Deploy to Amazon EC2 using CloudFormation
22

33
*Read this in other languages: [English](README.md), [简体中文](README-zh.md).*
44

5-
> **Note:** This deployment template is still in **BETA**. You may encounter failures during deployment. In that case, please open a new issue.
6-
75
This template will create a fully-working IPsec VPN server on Amazon Elastic Compute Cloud (Amazon EC2). Please make sure to check the EC2 [pricing details](https://aws.amazon.com/ec2/pricing/on-demand/) before continuing. Using a `t2.micro` server instance for your deployment may qualify for the [AWS Free Tier](https://aws.amazon.com/free/).
86

97
Available customization parameters:
@@ -20,7 +18,7 @@ Available customization parameters:
2018
2119
Make sure to deploy this template with an **AWS Account Root User** or an **IAM Account** with **Administrator Access**.
2220

23-
Right-click this [**template link**](https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/aws/cloudformation-template-ipsec) and save as a file on your computer. Then upload it as the template source in the [stack creation wizard](https://console.aws.amazon.com/cloudformation/home#/stacks/new).
21+
Right-click this [**template link**](https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/aws/cloudformation-template-ipsec.json) and save as a file on your computer. Then upload it as the template source in the [stack creation wizard](https://console.aws.amazon.com/cloudformation/home#/stacks/new).
2422

2523
![Upload the template](upload-the-template.png)
2624

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -651,21 +651,15 @@
651651
" regionName = event['ResourceProperties']['Region']",
652652
" distribution = event['ResourceProperties']['Distribution']",
653653
" ec2 = boto3.client('ec2',regionName)",
654-
" AMIName = ''",
655-
" if distribution == 'Ubuntu1604':",
656-
" AMIName = 'ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*'",
657-
" elif distribution == 'Ubuntu1804':",
658-
" AMIName = 'ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*'",
659-
" elif distribution == 'Ubuntu2004':",
660-
" AMIName = 'ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*'",
661-
" elif distribution == 'Debian9':",
662-
" AMIName = 'debian-stretch-hvm-x86_64-gp2-*'",
663-
" elif distribution == 'CentOS7':",
664-
" AMIName = 'CentOS 7.9.2009 x86_64'",
665-
" elif distribution == 'CentOS8':",
666-
" AMIName = 'CentOS 8.3.2011 x86_64'",
667-
" elif distribution == 'AmazonLinux2':",
668-
" AMIName = 'amzn2-ami-hvm-*.*-x86_64-gp2'",
654+
" AMIName = {",
655+
" 'Ubuntu1604': 'ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*',",
656+
" 'Ubuntu1804': 'ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*',",
657+
" 'Ubuntu2004': 'ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*',",
658+
" 'Debian9': 'debian-stretch-hvm-x86_64-gp2-*',",
659+
" 'CentOS7': 'CentOS 7.9.2009 x86_64',",
660+
" 'CentOS8': 'CentOS 8.3.2011 x86_64',",
661+
" 'AmazonLinux2': 'amzn2-ami-hvm-*.*-x86_64-gp2',",
662+
" }[distribution]",
669663
" response = ec2.describe_images(Filters=[{'Name':'name', 'Values':[AMIName]}], Owners=['099720109477', '379101102735', '125523088429', 'amazon'])",
670664
" images = response['Images']",
671665
" images.sort(key=creation_date,reverse=True)",

0 commit comments

Comments
 (0)