Skip to main content

Posts

How to Setup an EC2 Instance on AWS?

In this article, we will discuss "How to Setup an EC2 Instance on AWS?" . An Amazon EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure. It provides scalable computing capacity in the Amazon Web Services (AWS) Cloud. There are four main options to purchase Amazon EC2 Instances such as On-Demand Instances, Reserved Instances, Spot Instances, and Savings Plans. Basically, Amazon Elastic Compute Cloud (EC2) is the Amazon Web Service we use to create and run virtual machines in the cloud. Amazon provides EC2 instances under the free tier, it includes 750 hours of Linux and Windows t2.micro instances. For more details on the free tier click here . After the free tier period is over, AWS charged us as per the instance configuration. Click here to check the pricing details. Prerequisites AWS Account AWS Management Console Access Login to AWS Management Console Login to your AWS ...

How to Setup TailwindCSS in Angular?

In this article, we will discuss "How to Setup TailwindCSS in Angular" . "TailwindCSS" is known as utility first CSS framework, we can rapidly build modern websites without ever leaving the HTML. TailwindCSS is different from other CSS frameworks like Bootstrap, etc. You can create whatever you want as per the required UI using the given utility class (CSS class). Setup Angular Project You can use the following "ng new" command into the terminal to setup the Angular project. ng new ng-project You can skill this step if already have a running Angular project. Install tailwindcss Install tailwindcss via the following npm command. npm install -D tailwindcss postcss autoprefixer Then run the "npx init" command to generate a tailwind.config.js file. npx tailwindcss init Configure template paths Update the following code snippet to tailwind.config.js . content: [ "./src/**/*.html,ts", ], Update style.css Open "scr/style.css" a...

How to Fix the Color Swatch Issue in Shopify

In this article, we will discuss "How to fix the color swatch issue in Shopify" . Mostly, Shopify  themes provide a color swatch feature on the product and collection page. Color swatches replace the traditional dropdown for variant option color. However, if you are using some color names that are non-standard (like "Ivory", "zebra black", "denim blue" for instance), you will realize the color swatch appears white, as per the given screenshot.   Steps to fix the color swatch issue The basic reason for the issue, the theme can't guess which color to display. To make it work, please follow the given steps. You have to create your small image for the color and size should be (64px * 64px). Name the image according to the name of the variant color but keep the filename in lowercase and replace any spaces in the name with a hyphen. For example: A variant named: Ivory requires an image named: ivory.png. A variant named Zebra Black re...

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...