https://awsacademy.instructure.com/courses/76280 ![image](https://hackmd.io/_uploads/rk2pa5OWA.png) # Billing https://viblo.asia/p/aws-essentials-phan-3-guildline-settings-ec2-tren-aws-bWrZn0Av5xw ![image](https://hackmd.io/_uploads/ByGEWiO-C.png =x200) 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 ![image](https://hackmd.io/_uploads/BkoSNiO-0.png =x200) ![image](https://hackmd.io/_uploads/rypYSsOZR.png) ![image](https://hackmd.io/_uploads/BJY1UoubC.png) # AWS Cloud Security ![image](https://hackmd.io/_uploads/H1U012_W0.png) ![image](https://hackmd.io/_uploads/r1UZg3ub0.png) ![image](https://hackmd.io/_uploads/B1SAghuW0.png) Set user mới tạo ở quyền thấp nhất. ![image](https://hackmd.io/_uploads/ByiiM3u-A.png) ![image](https://hackmd.io/_uploads/BJ6lm2sbA.png) ## 2FA ![image](https://hackmd.io/_uploads/HyXEX3i-0.png) ## Log activity ![image](https://hackmd.io/_uploads/S123MhiWC.png) ## Bill report ![image](https://hackmd.io/_uploads/rJ4k7hib0.png) # Service https://awsacademy.instructure.com/courses/71965/modules/items/6436673 ## Organization ![image](https://hackmd.io/_uploads/ryg0k6o-C.png) ![image](https://hackmd.io/_uploads/r17meps-R.png) ## Key manager ![image](https://hackmd.io/_uploads/HksS1psZR.png) ![image](https://hackmd.io/_uploads/HJzOJ6ibC.png) ## Shield ![image](https://hackmd.io/_uploads/BygGyaoWR.png) ## 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 ![image](https://hackmd.io/_uploads/rkWTT53-0.png) ## Router ![image](https://hackmd.io/_uploads/S1eKnkin-R.png) Giống load balancing ## CDN ![image](https://hackmd.io/_uploads/H1GMKsn-C.png) 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 ![image](https://hackmd.io/_uploads/ry0w5Omz0.png) 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 ![image](https://hackmd.io/_uploads/SkLF2ccU0.png) ![image](https://hackmd.io/_uploads/ry6jkjc8C.png) ![image](https://hackmd.io/_uploads/Hy9Uls5UR.png) ![image](https://hackmd.io/_uploads/BJpFlj9U0.png) ## Backup ![image](https://hackmd.io/_uploads/SJg2gj9LC.png) ## 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 ![image](https://hackmd.io/_uploads/rk6cK2mfC.png) ## RDS https://viblo.asia/p/aws-essentials-phan-5-guildline-settings-rds-tren-aws-Eb85o4Q4K2G ![image](https://hackmd.io/_uploads/B1YS924M0.png) 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 ![image](https://hackmd.io/_uploads/SJM3YNa-A.png) 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. ![image](https://hackmd.io/_uploads/S1a224a-R.png) ![image](https://hackmd.io/_uploads/BJZWaB6ZC.png) ![image](https://hackmd.io/_uploads/rybU3k0ZA.png) 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 ![image](https://hackmd.io/_uploads/H1m_sgC-R.png) ![image](https://hackmd.io/_uploads/BJB8jx0bC.png) 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. ![image](https://hackmd.io/_uploads/S16D0l0-A.png) ## CLI ### Upload file to S3 https://viblo.asia/p/tim-hieu-ve-amazon-web-service-phan-2-RQqKLxxOK7z # Architecture design ![image](https://hackmd.io/_uploads/B1lDqa4MR.png =x200) ## Operation ![image](https://hackmd.io/_uploads/ryeJjTEf0.png =x70) ![image](https://hackmd.io/_uploads/rklujaNM0.png =x150) ![image](https://hackmd.io/_uploads/HyOU66NzA.png) ## Security ![image](https://hackmd.io/_uploads/HyTwaTEf0.png) ## Reliability ![image](https://hackmd.io/_uploads/SkHPA6NMC.png =x150) ## Performance ![image](https://hackmd.io/_uploads/BynW1AVzC.png) ## Trusted Avisor ![image](https://hackmd.io/_uploads/SJMQxCNMA.png) # 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/