Posts

Showing posts with the label nodejs

All practice series

Image
Introduction This is a comprehensive page about the technologies I have shared in series format. You can view brief introductions and links to directly access each series you are interested in. In the field of software development, to deploy a product from the initial idea to its release, the standard process typically involves several stages as follows: Database : Designing and implementing the database according to business requirements, storing data during the system's operation. Backend : Handling the main logic of the system, communicating with the database and services. Frontend : Building the interface for users to interact with the system, which could be a desktop, mobile, or web application. This usually includes implementing UI/UX and integrating APIs from the backend. DevOps : Deploying the system for use, which can be done on a server or in the cloud. Testing : Applying testing methods to ensure the product meets the standards for release. Of course, these are just stan...

Guide to pushing docker images to AWS ECR

Image
Introduction Amazon ECR (Elastic Container Registry) is a fully managed Docker Registry (image repository) by AWS. Instead of having to operate your own Docker Hub or install a Registry on a server, you use ECR to store, manage, and deploy Docker Container Images in a highly secure and scalable manner. Advantages Deep integration with AWS: ECR works most seamlessly with Amazon EKS (Kubernetes) and ECS. You only need to declare the image path, and AWS will handle the authentication and image pulling (pull) automatically. Absolute security: Use AWS IAM for authorization. Only authorized Services or Users can push/pull images. Images are also automatically encrypted at rest. Image Scanning: ECR automatically checks the images you push to find any libraries with security vulnerabilities (CVE), giving you more peace of mind about your code. Lifecycle Policies: You can set up automatic deletion of old images and untagged images to avoid wasting storage space. High performance: Since images a...

Using AWS CDK to Create an AWS S3 Bucket

Image
Introduction In my previous post, I introduced AWS S3 and showed how to set it up using the AWS CLI and NodeJS. In this post, I’ll show you how to use the AWS CDK to manage your AWS resources - specifically, how to create an S3 bucket. The AWS Cloud Development Kit (AWS CDK) is an open-source framework for defining Infrastructure as Code (IaC). Instead of writing long, complex YAML or JSON configuration files (like CloudFormation), CDK lets you use familiar programming languages like TypeScript, Python, Java, C#, or Go to manage your AWS resources. Why use AWS CDK? Use languages you already know: You can use loops, conditions, variables, and Object-Oriented Programming (OOP) to define your infrastructure. Great IDE support: You get features like autocomplete, error checking as you type, and built-in documentation. Reusable code: You can easily package your infrastructure into libraries to share across different projects. Prerequisites First, you need an AWS account. You will also need ...

Uploading Files to AWS S3 with NodeJS

Image
Introduction Amazon S3 (Simple Storage Service) is an object storage service offered by AWS. It's designed to be highly scalable, available, and secure, making it a popular choice for a wide range of use cases, from hosting static websites to storing backups and big data. Basic Concepts Object Is a file. Can include metadata to describe information for that file. Bucket Is where objects are stored. Can create one or many buckets in the regions that Amazon supports. The bucket name must be a unique name globally. Can configure permissions for the bucket to allow access and modification of files inside. Amazon S3 stores data as objects in buckets. AWS CLI First, access this link to install the AWS CLI according to the operating system you are using: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html Use the following command to check the version after successfully installing the AWS CLI: aws --version Next, use the following command to configure AWS inform...