https://awsacademy.instructure.com/courses/76280

# Billing
https://viblo.asia/p/aws-essentials-phan-3-guildline-settings-ec2-tren-aws-bWrZn0Av5xw

Inbound Data Transfer: Đây là dữ liệu được truyền vào (đến) từ bên ngoài vào môi trường AWS. Ví dụ, khi bạn tải dữ liệu lên các tài nguyên AWS như máy chủ EC2



# AWS Cloud Security



Set user mới tạo ở quyền thấp nhất.


## 2FA

## Log activity

## Bill report

# Service
https://awsacademy.instructure.com/courses/71965/modules/items/6436673
## Organization


## Key manager


## Shield

## VPC
https://viblo.asia/p/tim-hieu-ve-aws-phan-1-vpc-virtual-private-cloud-924lJGv05PM#_scenario-4---vpc-with-a-private-subnet-only-and-aws-site-to-site-vpn-access-14
https://labs.vocareum.com/main/main.php?m=clabide&mode=s&asnid=2593179&stepid=2593180&hideNavBar=1
https://viblo.asia/p/aws-essentials-phan-2-guideline-settings-vpc-tren-aws-yMnKMvnNZ7P

## Router

Giống load balancing
## CDN

https://viblo.asia/p/s3-security-and-cloudfront-cdn-gAm5yXRVldb#_encription-at-restserver-side-3
## Elastic beanstalk
https://viblo.asia/p/tim-hieu-ve-aws-phan-4-elastic-beanstalk-maGK7vQ95j2
## SSH service
https://viblo.asia/p/aws-essentials-phan-3-guildline-settings-ec2-tren-aws-bWrZn0Av5xw#_6-ip-addressing-20
Launch và sử dụng EC2 Instance
## ECS
https://viblo.asia/p/ecs-setting-up-63vKjX3bl2R
## S3

Standard: frequency accesss data.
Intelligent-Tiering: less frequently access, rapid access when need.
cái 3: store data in 3 avalable zones.
cái 4: 1 avalable zone, cheaper than 3.
https://viblo.asia/p/aws-essentials-phan-4-guildline-settings-s3-tren-aws-Ljy5Vmbolra
https://www.missioncloud.com/blog/resource-amazon-ebs-vs-efs-vs-s3-picking-the-best-aws-storage-option-for-your-business#:~:text=For%20example%2C%20an%20application%20might,for%20backups%20and%20static%20content.
https://drive.google.com/drive/folders/1INVnxZCtX2mcie6CwmIRW5XL_nks9fDq




## Backup

## SNS
Sending email setting up
https://viblo.asia/p/aws-ses-and-sending-email-setting-up-1VgZv8Em5Aw
https://viblo.asia/p/aws-essentials-phan-6-guildline-sns-basic-tren-aws-07LKXoEJ5V4
## Cloudwatch
https://viblo.asia/p/aws-essentials-phan-7-tim-hieu-ve-cac-management-tools-cloudwatch-cloudtrail-tren-aws-V3m5Wd0xKO7

## RDS
https://viblo.asia/p/aws-essentials-phan-5-guildline-settings-rds-tren-aws-Eb85o4Q4K2G

https://awsacademy.instructure.com/courses/71965/assignments/709700?module_item_id=6436724
Nosql -> dynamoDB
set up dynamodb demo
https://awsacademy.instructure.com/courses/71965/modules/items/6436726
## Auto scaling
https://viblo.asia/p/aws-essentials-phan-8-tim-hieu-auto-scaling-tren-aws-3Q75w64MlWb
# Compute Service EC2

Amazon EC2: provide resizable virtual machine.
Auto Scaling: allow you to define condition that will automatically launch or terminate EC2 instances.
ECR: store and retrieve docker image.
ECS: container orchestration service that support docker.
VMware Cloud: provision hibrid cloud without custom hardware.
Beanstalk: run and manage web application.
Lambda: is a serverless compute solution, pay only for the compute time that's you use
Lightsail: simple-to-use service for build app or web.
Batch: run batch jobs at any scale.
Fargate: provide a way to run container that reduce the need for you to manage server or cluster.



Dùng EBS để tránh mất data.
Nếu muốn IP cố định thì attach Elastic IP vào instance.(mỗi acc chỉ dc 5 IP ở mỗi region)
## Lambda
https://viblo.asia/p/aws-essentials-phan-10-tim-hieu-lambda-tren-aws-Az45byxolxY
## EBS
https://labs.vocareum.com/main/main.php?m=clabide&mode=s&asnid=2593187&stepid=2593188&hideNavBar=1
Create snapshot
```
sudo mkfs -t ext3 /dev/sdf
sudo mkdir /mnt/data-store
sudo mount /dev/sdf /mnt/data-store
echo "/dev/sdf /mnt/data-store ext3 defaults,noatime 1 2" | sudo tee -a /etc/fstab
df -h
```
Restore snapshot
```
sudo mkdir /mnt/data-store2
sudo mount /dev/sdg /mnt/data-store2
```
## Các loại instance
https://awsacademy.instructure.com/courses/71965/modules/items/6436699
Section 5 Video - Amazon EC2 Cost Optimization


1. On-Demand Instances:
* Có thể khởi chạy và sử dụng bất cứ khi nào bạn cần mà không cần cam kết dài hạn.
* Thanh toán: Bạn chỉ trả tiền cho thời gian thực sự sử dụng các instance này, tính theo giờ hoặc giây.
* Thích hợp khi: Bạn cần linh hoạt và không muốn cam kết dài hạn. Đây là lựa chọn tốt cho các ứng dụng có tính linh động cao hoặc yêu cầu tính mở rộng linh hoạt.
2. Spot Instances:
* Đấu giá cho mỗi giờ sử dụng. AWS sẽ cấp phát các instance này khi giá của bạn cao hơn giá Spot Instance hiện tại.
* Thanh toán: Bạn sẽ trả tiền cho mức giá Spot Instance hiện tại. Nếu giá Spot tăng cao hơn giá bạn đã đặt, instance của bạn có thể bị dừng.
* Thích hợp khi: Bạn có khả năng chấp nhận rủi ro bị dừng lại (stop) khi giá Spot tăng, và muốn tiết kiệm chi phí cho các ứng dụng có thể chịu được sự gián đoạn.
3. Reserved Instances:
* Cam kết sử dụng trong một khoảng thời gian dài (ví dụ như 1 năm hoặc 3 năm) với mức giá giảm so với On-Demand Instances.
* Thanh toán: Bạn trả trước cho một thời hạn sử dụng dài hạn. Giá trả trước ban đầu thấp hơn so với On-Demand Instances, nhưng bạn phải cam kết sử dụng trong thời gian đã định.
* Thích hợp khi: Bạn có thể dự đoán được nhu cầu sử dụng tài nguyên trong tương lai và muốn tiết kiệm chi phí bằng cách cam kết sử dụng lâu dài.
4. Dedicated Hosts:
* Các máy chủ vật lý mà bạn thuê hoàn toàn và có thể chạy nhiều instance EC2 trên đó.
* Thanh toán: Bạn trả phí cho mỗi giờ sử dụng máy chủ vật lý.
* Thích hợp khi: Bạn cần kiểm soát hoàn toàn về vị trí triển khai của các instance EC2 và cần đáp ứng các yêu cầu pháp lý hoặc tuân thủ nghiêm ngặt.
## Tiết kiệm chi phí
Dừng EBS không xài.

## CLI
### Upload file to S3
https://viblo.asia/p/tim-hieu-ve-amazon-web-service-phan-2-RQqKLxxOK7z
# Architecture design

## Operation



## Security

## Reliability

## Performance

## Trusted Avisor

# Deploy
https://viblo.asia/u/tran.duy.long
https://viblo.asia/u/khanhhd
Deploy Reactjs App Trên ECS Tích Hợp CI CD ( CodeCommit | CodeBuild | CodePipeline )
https://viblo.asia/p/aws-deploy-reactjs-app-tren-ecs-tich-hop-ci-cd-codecommit-codebuild-codepipeline-Qbq5QDemlD8
[BOT][AWS Lambda] Sử dụng Selenium trên Lambda Function để theo dõi giá sản phẩm Shoppe định kỳ
https://viblo.asia/p/botaws-lambda-su-dung-selenium-tren-lambda-function-de-theo-doi-gia-san-pham-shoppe-dinh-ky-ORNZqpMnK0n
Event Monitoring Using AWS CloudTrail
https://medium.com/opstree-technology/event-monitoring-using-aws-cloudtrail-6f9b96f42ade
https://bohansec.com/2023/11/22/Deploy-Your-Own-OpenVPN-Server-on-AWS/
https://bohansec.com/2023/11/28/Deploy-T-Pot-Honeypot-To-AWS/
https://sharmilas.medium.com/a-step-by-step-guide-to-creating-load-balancer-and-ec2-with-auto-scaling-group-using-terraform-752afd44df8e
# Avanced
https://aws.amazon.com/blogs/devops/automate-terraform-deployments-with-amazon-codecatalyst-and-terraform-community-action/
https://aws.amazon.com/blogs/devops/
https://aws.amazon.com/blogs/devops/tag/best-practices/