Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LyHoangViet authored Nov 6, 2024
0 parents commit d340760
Show file tree
Hide file tree
Showing 296 changed files with 12,245 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Name of flow
name: production

# The event of github
# When should it (workflows) run?
on:
# Trigger when pull request is made to master, main
# and has type is `closed`, but it isn't enough
push:
branches: [master, main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.128.0
steps:
# Install hugo theme
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public
.hugo_build.lock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/hugo-theme-learn"]
path = themes/hugo-theme-learn
url = https://github.com/matcornic/hugo-theme-learn.git
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Workshop Template
WE DON'T OWN THIS PRODUCT, We just use it to serve our work.

This repo is set up with Github Actions, your pages are deployed when you push into `main` branch.

## Requirements
1. Hugo theme [windows](https://gohugo.io/installation/windows/), [linux](https://gohugo.io/installation/linux/)
2. VSCode or another code editor
3. AWS Account

## How to use?
You should use this repo as template.
![image](https://github.com/user-attachments/assets/675d7a9f-8a00-469b-a328-03ec4f4c6f73)

OR
![image](https://github.com/user-attachments/assets/b699794e-50b1-46a7-85cb-b1ad45bdfc75)
6 changes: 6 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

42 changes: 42 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Change the default theme to be use when building the site with Hugo
theme = "hugo-theme-learn"
canonifyURLs = true

# For search functionality
[outputs]
home = [ "HTML", "RSS", "JSON"]

[params]
# Change default color scheme with a variant one. Can be "red", "blue", "green".
themeVariant = "workshop"
# Git hub repo link
editURL = ""
description = ""
author = "journeyoftheaverageguy@gmail.com"
showVisitedLinks = true
disableBreadcrumb = false
disableNextPrev = false

[Languages]
[Languages.en]
title = "AWS Account Setup"
weight = 1
languageName = "English"

[[Languages.en.menu.shortcuts]]
name = "<i class='fab fa-facebook'></i> AWS Study Group"
identifier = "AWS Study Group FB"
url = "https://www.facebook.com/groups/awsstudygroupfcj/"
weight = 20

[Languages.vi]
title = "Thiết lập AWS Account"
weight = 2
languageName = "Tiếng Việt"

[[Languages.vi.menu.shortcuts]]
name = "<i class='fab fa-facebook'></i> AWS Study Group"
identifier = "AWS Study Group FB"
url = "https://www.facebook.com/groups/awsstudygroupfcj/"
weight = 20

53 changes: 53 additions & 0 deletions content/1-Create-New-AWS-Account/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
+++
title = "Hello world"
date = 2020-05-14T00:38:32+07:00
weight = 1
chapter = false
pre = "<b>1. </b>"
+++


**Content:**
- [Create an AWS Account](#create-an-aws-account)
- [Add a payment method](#add-a-payment-method)
- [Verify your phone number](#verify-your-phone-number)
- [Choose an AWS Support plan](#choose-an-aws-support-plan)
- [Wait for your account to be activated](#wait-for-your-account-to-be-activated)

#### Create an AWS Account

1. Go to the [Amazon Web Services (AWS) home page](https://aws.amazon.com/).
2. Click **Create an AWS Account** in the top right corner.
- **Note:** If you signed in to AWS recently, click **Sign in to the Console**. If **Create a new AWS account** isn't visible, first click on **Sign in to a different account**, and then click **Create a new AWS account**.
3. Enter the account information and and then select **Continue**.
- **Important**: Make sure you enter the correct information, especially email.
4. Select the type of account.
- **Note**: Personal and Professional both share the same features.
5. Enter your company or personal information.
- **Important**: For professional AWS accounts, it's a best practice to enter the company phone number rather than a personal cell phone.
6. Read and agree to the [AWS Customer Agreement](https://aws.amazon.com/agreement/).
7. Select **Create Account** and **Continue**.

#### Add a payment method

On the Payment Information page, enter the information about your payment method, and then choose **Verify and Add**.
- **Note:** If you want to use a different billing address for your AWS billing information, select **Use a new address** before you select **Verify and Add**.

#### Verify your phone number
1. Choose your country or region code from the list.
2. Enter a phone number where you can be reached in the next few minutes.
3. Enter the code displayed in the CAPTCHA, and then submit.
4. In a few moments, an automated system contacts you.
5. Enter the PIN you receive, and then choose Continue.

#### Choose an AWS Support plan

- On the **Select a Support Plan** page, choose one of the available Support plans. For a description of the available Support plans and their benefits, see [Compare AWS Support Plans](https://aws.amazon.com/premiumsupport/plans/).

#### Wait for your account to be activated



After you choose a Support plan, a confirmation page indicates that your account is being activated. Accounts are usually activated within a few minutes, but the process might take up to 24 hours. \
You can sign in to your AWS account during this time. The AWS home page might display a Complete Sign Up button during this time, even if you've completed all the steps in the sign-up process. \
Once your account is fully activated, you will receive a confirmation email. Check your email and spam folder for the confirmation email. After you receive this email, you have full access to all AWS services.
48 changes: 48 additions & 0 deletions content/1-Create-New-AWS-Account/_index.vi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
+++
title = "Tạo mới tài khoản AWS"
date = 2020-05-14T00:38:32+07:00
weight = 1
chapter = false
pre = "<b>1. </b>"
+++


**Nội dung:**
- [Tạo tài khoản AWS](#tạo-tài-khoản-aws)
- [Thêm phương thức thanh toán](#thêm-phương-thức-thanh-toán)
- [Xác thực số điện thoại của bạn](#xác-thực-số-điện-thoại-của-bạn)
- [Chọn Support Plan](#chọn-support-plan)
- [Đợi account của bạn được kích hoạt](#đợi-account-của-bạn-được-kích-hoạt)

#### Tạo tài khoản AWS

1. Đi đến trang [Amazon Web Service homepage](https://aws.amazon.com/).
2. Chọn **Create an AWS Account** ở góc trên bên phải.
- ***Ghi Chú:** Nếu bạn không thấy **Create an AWS Account**, chọn **Sign In to the Console** sau đó chọn **Create a new AWS Account**.*
3. Nhập thông tin tài khoảng và chọn **Continue**.
- ***Quan Trọng**: Hãy chắc chắn bạn nhập đúng thông tin, đặc biệt là email.*
4. Chọn loại account.
- ***Ghi chú**: Personal và Professional đều có chung tính năng.*
5. Nhập thông tin công ty hoặc thông tin cá nhân của bạn.
6. Đọc và đồng ý [AWS Customer Agreement](https://aws.amazon.com/agreement/).
7. Chọn **Create Account****Continue**.

#### Thêm phương thức thanh toán

- Nhập thông tin thẻ tín dụng của bạn và chọn **Verify and Add**.
- ***Ghi chú**: Bạn có thể chọn 1 địa chỉ khác cho tài khoản của bạn bằng cách chọn **Use a new address** trước khi **Verify and Add**.*

#### Xác thực số điện thoại của bạn

1. Nhập số điện thoại.
2. Nhập mã security check sau đó chọn **Send SMS**.
3. Nhập mã code được gửi đến số điện thoại của bạn.

#### Chọn Support Plan

- Trong trang **Select a support plan**, chọn 1 plan có hiệu lực, để so sánh giữa cách plan, bạn hãy xem [Compare AWS Support Plans](https://aws.amazon.com/premiumsupport/plans/).

#### Đợi account của bạn được kích hoạt

- Sau khi chọn **Support plan**, account thường được kích sau sau vài phút, nhưng quá trình có thể cần tốn đến 24 tiếng. Bạn vẫn có thể đăng nhập vào account AWS lúc này, Trang chủ AWS có thể sẽ hiển thị một nút “Complete Sign Up” trong thời gian này, cho dù bạn đã hoàn thành tất cả các bước ở phần đăng kí.
- Sau khi nhận được email xác nhận account của bạn đã được kích hoạt, bạn có thể truy cập vào tất cả dịch vụ của AWS.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
+++
title = "Virtual MFA Devices"
date = 2021
weight = 1
chapter = false
pre = "<b>2.1. </b>"
+++

{{% notice note%}}
To enable MFA, you need to log in to AWS using the root user.
{{% /notice%}}

#### Activate virtual MFA devices via Console

To set up and activate virtual MFA devices:

1. Sign-in to the AWS Console.
2. In the upper right corner, you will see your account name. Click the drop-down and select **My Security Credentials**.

![Virtual MFA Device](/images/1-account-setup/MySecurity_v1.png?width=15pc)

3. Expand **Multi-factor authentication (MFA)** and select **Active MFA**.

![MFA Section](/images/1-account-setup/MFA.png?width=90pc)

4. In Manage MFA Device, select **Virtual MFA device** then select **Continue**.
5. Install a [compatible Authenticator application](https://aws.amazon.com/iam/features/mfa/#Virtual_MFA_Applications) on your phone.
6. After installing the app, select **Show QR Code** and use your Authenticator application to scan the QR code.
- Sample MFA registration with _Microsoft Authenticator_:
![MFA QR Scanner](/images/1-account-setup/MFAScannerQR.png?width=90pc)
1. In the **MFA code 1** box, enter 6 numeric characters from the app. Wait 30 seconds or until the next refresh, then enter the next 6 characters into the **MFA Code 2** box and select **Assign MFA**.
2. You have now completed activating your **virtual MFA device**!
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
+++
title = "Thiết bị MFA ảo"
date = 2021
weight = 1
chapter = false
pre = "<b>2.1. </b>"
+++

{{% notice note %}}
Để kích hoạt MFA, bạn cần đăng nhập vào AWS sử dụng root user.
{{% /notice %}}

#### Kích hoạt thiết bị MFA ảo thông qua Console

Để thiết lập và kích hoạt thiết bị MFA ảo:

1. Đăng nhập vào AWS Console.
2. Góc trên bên phải, bạn sẽ thấy tên account của bạn, chọn vào và chọn **My Security Credentials**.

![Virtual MFA Device](/images/1-account-setup/MySecurity_v1.png?width=15pc)

3. Mở rộng **Multi-factor authentication (MFA)** và chọn **Active MFA**.

![MFA Section](/images/1-account-setup/MFA.png?width=90pc)

4. Trong Manage MFA Device, chọn **Virtual MFA device** sau đó chọn **Continue**.
5. Cài đặt ứng dụng tương thích trên điện thoại của bạn. [Danh sách ứng dụng MFA](https://aws.amazon.com/iam/features/mfa/?audit=2019q1).
6. Sau khi cài đặt ứng dụng, chọn **Show QR Code** và dùng điện thoại đang mở ứng dụng MFA của bạn để scan mã QR.
- ***Ví dụ:** Bạn đang sử dụng *Microsoft Authenticator*.
![MFA QR Scanner](/images/1-account-setup/MFAScannerQR.png?width=90pc)
7. Ở ô **MFA code 1**, nhập 6 kí tự số trong app, đợi 30 giây sau đó nhập tiếp 6 kí tự số vào ô **MFA Code 2** và chọn **Assign MFA**.
8. Bây giờ bạn đã hoàn thành kích hoạt **thiết bị MFA ảo**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
+++
title = "U2F Security Key"
date = 2021
weight = 2
chapter = false
pre = "<b>2.2. </b>"
+++
{{%notice info%}}
The following steps require a U2F security key.
{{%/notice%}}

#### Enable U2F security key via Console

U2F is an open authentication standard hosted by the [FIDO Alliance](https://fidoalliance.org/). When you enable a U2F key in AWS, the U2F security key creates a new key pair for use with only AWS. First, you enter your credentials. When prompted, you tap the U2F security key, which responds to the authentication challenge issued by AWS.

1. Sign-in to AWS Console.
2. In the upper right corner, you'll see your account name, select and select **My Security Credentials**.

![Image](/images/1-account-setup/MySecurity_v1.png?width=15pc)

**Note:** To manage a U2F security key for your own IAM user while protecting sensitive MFA-related actions, you must have the permissions from the following policy.
<!-- policy not associated with user -->
> 1. In the left bar, select **Policies** then select **Create policy**. Select **JSON** tab and paste the policy document from below:
>
> ```json
> {
> "Version": "2012-10-17",
> "Statement": [
> {
> "Sid": "AllowManageOwnUserMFA",
> "Effect": "Allow",
> "Action": [
> "iam:DeactivateMFADevice",
> "iam:EnableMFADevice",
> "iam:GetUser",
> "iam:ListMFADevices",
> "iam:ResyncMFADevice"
> ],
> "Resource": "arn:aws:iam::*:user/${aws:username}"
> },
> {
> "Sid": "DenyAllExceptListedIfNoMFA",
> "Effect": "Deny",
> "NotAction": [
> "iam:EnableMFADevice",
> "iam:GetUser",
> "iam:ListMFADevices",
> "iam:ResyncMFADevice"
> ],
> "Resource": "arn:aws:iam::*:user/${aws:username}",
> "Condition": {
> "BoolIfExists": {
> "aws:MultiFactorAuthPresent": "false"
> }
> }
> }
> ]
> }
> ```
>
> 2. Select **Next: Tags**. You'll be presented with a screen about **Tags**, a tool used to identify groups of AWS resources.
> 3. Select **Next: Review**. This is a screen that allows you to review the policy that you are creating.
> 4. Enter the name of the policy (for example, `MFAHardDevice`) and select **Create policy**.
>
> ![MFA Policy](/images/1-account-setup/MFAPolicy.png?width=90pc)
3. In the left bar, select **Dashboard** and then select **Enable MFA**.
![Dashboard](/images/1-account-setup/Dashboard.png?width=90pc)
4. Expand **Multi-factor authentication (MFA)** and then select **Active MFA**.
![MFA Section](/images/1-account-setup/MFA.png?width=90pc)
5. Under **Manage MFA Device**, select **U2F security key** then press **Continue**.
6. Plug the U2F security key into your computer.
![Image](/images/1-account-setup/U2FSK.png?width=30pc)
7. Follow the on-screen prompts to press the U2F security key, and then select **Close** when U2F is successfully set up.
Loading

0 comments on commit d340760

Please sign in to comment.