Skip to main content

Posts

How to Manage AWS Lambda Versioning and Aliases

In this article, we will discuss "How to Manage AWS Lambda Versioning and Aliases" . The use of AWS Lambda versioning and Aliases are the safest way to manage and deploy the Lambda functions. We can split our production and testing environment easily. No one can apply any kind of change in the published version, because of this our production published version is completely safe for an unwanted or accidental change. I will try to explain both ways such as GUI and Command-Line in this article. Basic Understanding on AWS Lambda Lambda Versions Each of the Lambda versions has a unique ARN. For more details, check the official documentation for Lambda Versions. The function ARN will have a format such as: arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:test_func:1 "xxxxxxxxxxxx" stands for the AWS account id, and test_func is a Lambda function name. The number 1 at the end of the ARN indicates the version. Also, possible to refer to a function's latest version: arn...

Features of Laravel 9

The new version of Laravel 9 is released on 8 February 2022, it's an LTS version of Laravel. In this article, we will discuss the features of Laravel 9. No introduction is required for Laravel, it's a mostly used PHP framework for a long time now. Laravel Support Policy Laravel 9 provides long-term support, similar to Laravel 6. It's an LTS version so Laravel 9 will provide the longest maintenance and support guidance. You will get two years of support to fix bugs, which will remain until February 2024. For Security support, it will be for three years which will last till 2025. Please check the following. Read more on support policy here . Minimum requirement of PHP 8. Laravel, as a framework, depends on several community-driven and Symfony 9 libraries. As Symfony planned to release v6.0 by November 2021, that forced the Laravel team to delay the release of Laravel 9. This is the reason for the minimum requirement of PHP 8. Anonymous Stub Migrations In the latest version of...

Basic Understanding on AWS Lambda

In this article, we will discuss "Brief Understanding on AWS Lambda" . As we know, Amazon Web Services (AWS) offers more than 200 services. Today, I'll try to explain to you AWS Lambda in simple terms. You get a brief exposure to what exactly the AWS Lambda is, how it works, its limitations, benefits, costing, and more. What is AWS Lambda? Lambda is a serverless, event-driven compute service. Here, we run our code without provisioning and managing any server. AWS Lambda functions are scaled automatically, from a few requests to thousand requests per day or second. You can pay only for the compute time, it will not change us when our function is not running. We can invoke a Lambda function using the Lambda API, AWS CLI or Lambda can run our function to handle the response of other AWS services. Some of the common examples are given below: Process streaming data stored in Amazon Kinesis. Handle user response in Amazon Connect in between the calls. Process two-way c...

Laravel Sanctum - Restful API Authentication

In this article, we will discuss "Laravel Sanctum - Restful API Authentication" . Laravel Sanctum provides a simple authentication system for mobile applications, SPA (Single Page Application), and token-based API. We can generate multiple API tokens for the user account. Also, we can assign abilities/scopes which specify which actions the tokens are allowed to perform. For example, we can assign abilities as per the user roles. Laravel Sanctum or Laravel Passport ? Passport provides a complete solution for OAuth2 authentication. If OAuth is not required in your project then Sanctum is right for your application. Sanctum is light and easy to implement. Prerequisites Knowledge of Laravel, you can check our other post on Laravel . Basic knowledge of HTTP client postman. You are free to use any of HTTP client, s Getting Started Let's setup a new Laravel application, use the following composer command into the terminal. composer create-project laravel/laravel la...

How to Upload File to AWS S3 Bucket Laravel

In this article, we will discuss "How to Upload File to AWS S3 Bucket Laravel" . It's known as Amazon Simple Storage Service and an object storage service that offers scalability, security, performance, and data availability. We can use AWS S3 Bucket to store and retrieve any amount of data at any time. Data is stored as objects in S3 Buckets. You have to check the pricing of the AWS S3 bucket . Also, AWS provides us the S3 bucket 5GB standard storage under a free tire for 12 months. Prerequisites AWS Account AWS Management Console Access Basic knowledge of AWS, If you are new to AWS then read service pricing properly. Otherwise, AWS charges your card when the free tier limit is crossed. IAM User (Check my  previous post ) Create AWS S3 Bucket Login with the AWS Management Console and go to the S3 bucket dashboard. Click on the Create bucket button, then you are redirected to the next step. Here, you have to add the Bucket name. You can apply encryption, versi...

How to Create Database Backup in Laravel

In this article, we will discuss "How to Create Database Backup in Laravel" . In this, we are not going to use any additional package. We will create our artisan command for DB backup and schedule the same for daily or our desired time. Database backup is a basic requirement of each project where we use a database. So we maintain the different services to take database backup. Some of the hosting providers, provide us daily backup for databases and files. Create Laravel Project Use the following composer command to install the fresh copy of Laravel. composer create-project laravel/laravel laravel-project --prefer-dist Establish Connection with DB Open the ".env"  file, located at the root of the Laravel project, and update the required DB credentials. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel8 DB_USERNAME=root DB_PASSWORD=root Create Artisan Command Run the following artisan command on the terminal. php artisan make:command DatabaseBacku...

How to Manage Password Strength - Angular

In this article, we will discuss "How to Manage Password Strength - Angular" . There are multiple ways to implement this feature in your Angular application such as applying pattern validation, creating a password strength meter, or using any existing package. In this example, I'm using the Angular Reactive form. You will learn pattern validation and how to create a password strength meter. Getting Start I'm using StackBlitz to run this example. This is an online IDE, so no need to setup Angular on local and you can share your code with the community. And, I'm assuming you are familiar with Angular, so I'm not adding basic steps in this article such as creating an angular project, adding Reactive form and etc. At the end of this article, we are going to see how to use: Reactive Forms and Validators (In a simple way) Component interactions using @Input and @Output decorators In the example, I will explain to you using two examples both are using RegExp t...