Posts

Showing posts with the label s3

Deploy docker image to AWS Lambda

Image
Introduction In my previous article, I provided instructions on using lambda to implement a function to resize images on demand; now, I will provide instructions on deploying a docker image to lambda. The advantage of using Lambda is pay on demand, suitable for types of projects newly released in the early stages when there are not yet many uses; deployment with Lambda helps simplify the process for the dev team to focus on feature development; resource management will be managed by AWS, and will automatically scale according to user usage needs. Detail Using AWS CDK, create the file lib/deploy-lambda-stack.ts import * as cdk from "aws-cdk-lib" import * as ecr from "aws-cdk-lib/aws-ecr" import * as iam from "aws-cdk-lib/aws-iam" import * as lambda from "aws-cdk-lib/aws-lambda" import { Construct } from "constructs" export class DeployLambdaStack extends cdk . Stack { constructor ( scope : Construct , id : ...

Using AWS EKS with CloudFront and WAF

Image
Introduction In previous articles, I guided you through using AWS EKS to create Kubernetes resources in the traditional way using yaml files or using KubernetesManifest directly via AWS CDK. The result is that we access the application directly through the LoadBalancer Address, but this is only an HTTP connection. To enhance security, in this article, we will explore how to use it alongside CloudFront for HTTPS connections and WAF. AWS WAF (Web Application Firewall) is a firewall service that protects web applications (delivered via CloudFront, ALB, or API Gateway) from common security vulnerabilities. Instead of just basic IP blocking, WAF deeply analyzes HTTP/HTTPS content to make decisions to allow or block requests. Advantages Protection against automated attacks: Effectively prevents common types of attacks such as SQL Injection, Cross-Site Scripting (XSS), and vulnerabilities in the OWASP Top 10. Bot and DDoS Blocking: Uses AWS Managed Rules to block malicious bots from scraping ...