---
title: Blog - Trusted Team Extension Partner For Europe & USA (8)
description: Empower your business with our expert team augmentation services. Scale efficiently and stay ahead in the ever-evolving tech landscape. (8)
---

[Skip to content](https://www.craftsmensoftware.com/blog/page/8#main)

\[ CLIENT STORY \]

CLOSE ✕

[![Craftsmen](https://crafty-astro-2-0.skarif2.workers.dev/_astro/logo.CZgI5u57_1oRGAt.webp)![Craftsmen](https://crafty-astro-2-0.skarif2.workers.dev/_astro/logo-dark.B-8biif6_paamB.webp)](https://www.craftsmensoftware.com)

[About us↗](https://www.craftsmensoftware.com/about-us)[Client Stories↗](https://www.craftsmensoftware.com/client-success-stories)[Case Study↗](https://www.craftsmensoftware.com/case-study)[How We Work↗](https://www.craftsmensoftware.com/how-we-work)[Blog↗](https://www.craftsmensoftware.com/blog)[Career↗](https://careers.craftsmensoftware.com/)

[![](https://www.craftsmensoftware.com/hubfs/norway.svg)NO](https://www.craftsmensoftware.com/no/)

[Get In Touch↗](https://www.craftsmensoftware.com/contact-us)MENU

[About us↗](https://www.craftsmensoftware.com/about-us)[Client Stories↗](https://www.craftsmensoftware.com/client-success-stories)[Case Study↗](https://www.craftsmensoftware.com/case-study)[How We Work↗](https://www.craftsmensoftware.com/how-we-work)[Blog↗](https://www.craftsmensoftware.com/blog)[Career↗](https://careers.craftsmensoftware.com/)

[![](https://www.craftsmensoftware.com/hubfs/norway.svg)NORSK](https://www.craftsmensoftware.com/no/)

[Get In Touch↗](https://www.craftsmensoftware.com/contact-us)

# Insights on Software, Teams*and Technology Growth*

Explore practical perspectives on software delivery, team collaboration, and technology partnerships that help growing businesses make better decisions and build with confidence.

[Discuss Your Needs](https://www.craftsmensoftware.com/contact-us)

![Craftsmen engineers and international partners on stage at Tech for Good in Bergen](https://www.craftsmensoftware.com/hs-fs/hubfs/Software%20Team%20Norway%2c%20UK%2c%20USA%2c%20Sweden.jpg?width=2000&name=Software%20Team%20Norway%2c%20UK%2c%20USA%2c%20Sweden.jpg)

Search articles

[All](https://www.craftsmensoftware.com/blog#articles) [Blog](https://www.craftsmensoftware.com/blog/tag/blog#articles)[AWS](https://www.craftsmensoftware.com/blog/tag/aws#articles)[Tech](https://www.craftsmensoftware.com/blog/tag/tech#articles)[Python](https://www.craftsmensoftware.com/blog/tag/python#articles)[Tips and hacks](https://www.craftsmensoftware.com/blog/tag/tips-and-hacks#articles)[lambda](https://www.craftsmensoftware.com/blog/tag/lambda#articles)[Software Team Augmentation](https://www.craftsmensoftware.com/blog/tag/software-team-augmentation#articles)[DynamoDB](https://www.craftsmensoftware.com/blog/tag/dynamodb#articles)[Team Augmentation](https://www.craftsmensoftware.com/blog/tag/team-augmentation#articles)[AI](https://www.craftsmensoftware.com/blog/tag/ai#articles)[Nodejs](https://www.craftsmensoftware.com/blog/tag/nodejs#articles)[serverless](https://www.craftsmensoftware.com/blog/tag/serverless#articles)[React](https://www.craftsmensoftware.com/blog/tag/react#articles)[Flask](https://www.craftsmensoftware.com/blog/tag/flask#articles)[GraphQL](https://www.craftsmensoftware.com/blog/tag/graphql#articles)[FFmpeg](https://www.craftsmensoftware.com/blog/tag/ffmpeg#articles)[Git](https://www.craftsmensoftware.com/blog/tag/git#articles)[GoLang](https://www.craftsmensoftware.com/blog/tag/golang#articles)[SQL](https://www.craftsmensoftware.com/blog/tag/sql#articles)[Transcription](https://www.craftsmensoftware.com/blog/tag/transcription#articles)[Vite](https://www.craftsmensoftware.com/blog/tag/vite#articles)

Newest firstPage 8 of 11

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/41_Unified_Cloud_Transcription_Framework.webp)](https://www.craftsmensoftware.com/blog/unified-cloud-transcription-framework)

### [Unified Cloud Transcription Framework](https://www.craftsmensoftware.com/blog/unified-cloud-transcription-framework)

A comprehensive system to optimize and expedite the audio-to-text conversion process is the Unified Cloud Transcription Framework. It guarantees accurate, effective, and dependable transcription workflows for a range of applications by combining multiple transcription services and tools into a single cloud-based platform. With the rise of machine learning and cloud computing, it looks like every major cloud provider has their own transcription (speech-to-text) service. Giants like Google, Amazon, Microsoft and IBM support a good number of languages that can be transcribed from a given audio input. It can be hard to decide which one is better for which language before we have tested them all extensively. But if we want, we can consider leaving this choice to the user if we can integrate all of the services easily. Each of the cloud transcription services have a different API, but the ways to deal with them are mostly similar. This insight allows us to come up with a unified framework for integrating them all. This is specially true for the common use case of transcribing long audio clips. Let’s talk about what we need to handle in general for all services. The following flowchart pretty much sums it up. Audio format We have seen that all the major services accept WAV, and 16-bit, single-channel, 22050 Hz WAV files have pretty good quality. So if we convert our input material to this format, we can feed it to any transcription service. Transcoding means to convert from one format to another. In this case, we should convert the input media which can be a combination of video (H264, MPEG2 etc.) and/or compressed audio (MP3, AAC etc.), into the WAV format as described above. For transcoding, we can use FFmpeg or some other tool/service, e.g., AWS MediaConvert. Media location Some services expect an HTTP URL to the input file, which can be done by creating a presigned URL from a bucket path. Some expect it in their own bucket (e.g., Google), in which case, we need to upload there prior to starting the job. Some services support the audio content to be posted with the API (e.g. IBM). Start the job Each service has an API to start the transcription job, by calling it via SDK or HTTP. With this API, the service usually takes – the media (presigned URL, path to file in a bucket, or posted with the API) language code (usually in the form -, e.g. en-US) other configurations: sample rate of the audio, channel count (if multichannel is supported), whether to enable speaker identification and confidence, output bucket path if needed, etc. The API returns a job ID, to be able to later query the status or results. For example, AWS SDK has TranscribeService.startTranscriptionJob, Google has speech.v1p1beta1.SpeechClient.longRunningRecognize in their @google-cloud/speech package, and IBM has regional endpoints like: Polling Most providers do not support specifying a callback URL to let us know whether the job has been completed or failed. So we need to have a polling cycle of our own to periodically check the ongoing jobs. Of course, we need to maintain a map of these running jobs on our end, along with job IDs and other details. Get job status There is usually an API that allows you to get the status of a transcription job, whether it is complete, in-progress, or failed. Sometimes this even provides the progress percentage. Fetch job result The actual output of a successful job can be retrieved from the service with a separate API call, or some providers can return it as part of the same call that returns the job status (Google and IBM). AWS writes the output to a bucket that we need to read from. Process/convert the output The results returned from the services vary in structure and format, though most of them have the same information, like an array of words, with each word having a start time, end time, and confidence. We need to have a step to convert the service format into our own internal format that the rest of our system can rely on. To illustrate how the formats differ from service to service, we present sample extracts from three providers. Google AWS IBM Clean up This step is for any housekeeping necessary, e.g., we may need to clean up the audio file uploaded to the provider’s bucket, in order to not consume space unnecessarily. Conclusion Having a unified framework really simplifies adding more transcription providers. At Craftsmen, we were able to successfully integrate these services following this approach — Google Cloud Speech-to-Text AWS Transcribe IBM Watson Speech To Text Microsoft Azure Speech To Text Speechmatics

**Syed Andaleeb Roomy**13 Mar 2024 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/35_Managing_Python_Dependencies_In_Serverless-1.webp)](https://www.craftsmensoftware.com/blog/managing-python-dependencies-in-serverless)

### [Managing Python Dependencies in Serverless](https://www.craftsmensoftware.com/blog/managing-python-dependencies-in-serverless)

Prerequisites In order to run the following commands, you need to have a Ubuntu (or any other Debian-based) work environment up and running! STEPS Upgrade pip and virtaulenv Run the following commands:sudo -H pip3 install --upgrade pip sudo -H pip3 install virtualenv Then we need to create a virtaulenv python3 -m venv your\_venv Now we have to activate it. source your\_venv/bin/activate Install all the dependencies specified in the requirements.txt file pip install -r requirements.txt Install the Serverless Python Requirements Pluginsls plugin install -n serverless-python-requirements This will automagically add the plugin to the serverless.yml fileplugins: - serverless-python-requirements To make the package of python dependencies, run sls package Now deploy it to AWS sls deploy All okay? Boom!

**Saimon hossain**03 Oct 2023 Read →

[![Build a CLI application with Python and Typer](https://www.craftsmensoftware.com/hubfs/Build%20a%20CLI%20pipeline.webp)](https://www.craftsmensoftware.com/blog/build-a-cli-application-with-python-and-typer)

### [Build a CLI application with Python and Typer](https://www.craftsmensoftware.com/blog/build-a-cli-application-with-python-and-typer)

CLI applications are ubiquitous and we are using them every day whether it be Git, Curl, or Pip. In this blog, I will show you how to build a Site Connectivity Checker using Python and Typer. Typer is a fantastic library for quickly building CLI apps using Python’s standard type hints. It’s written by the same author of FastAPI – Sebastián Ramírez. Overview Our application will make GET requests to the URLs provided by the users as a space-separated string or in a file, and display results. By default, the app will make blocking requests with the help of the requests library. We’ll make asynchronous requests to make our app faster with the aiohttp library. URL Retriever Users of our application can input URLs either as a space-separated string or in a file. Let’s implement the functions necessary to parse the URLs. URLs from string URLs from file Blocking HTTP Requests By default, our application will make blocking HTTP requests with the requests library. Let’s write our code for this default behavior. Progressbar You can display the progress of any time-consuming operations using the typer.progressbar. Non-blocking HTTP Requests For multiple websites, blocking HTTP request is a very time-consuming process. Instead we can do better with the help of aiohttp. Our application will perform asynchronous requests if the --a option is supplied. Let’s write some functions to facilitate non-blocking HTTP requests. Displaying the results Printing with Echo You can use typer.echo() to print to the screen. It’s recommended to use echo() instead of the standard print() function. Enter main() Let’s dive deep into the entry point of our app – the main. CLI options We have three CLI options, namely --urls, --file and --a. If you supply --urls, the app will parse the URLs from the given string. If you supply --file, the app will read all the URLs in that file. If the --a flag is enabled, the app will make asynchronous HTTP requests. The order of options does not matter. Running our application To run the app with a bunch of URLs separated by space, use the following command: Copy python cli-app/main.py --urls "https://google.com https://facebook.com" python cli-app/main.py --urls "https://google.com https://facebook.com"

**Saimon hossain**17 Sep 2023 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Vite-might-be-your-next-front-end-bundler.webp)](https://www.craftsmensoftware.com/blog/vite-might-be-your-next-front-end-bundler)

### [Vite might be your next front end bundler](https://www.craftsmensoftware.com/blog/vite-might-be-your-next-front-end-bundler)

Imagine you have an existing react project that contains a lot of external modules and also your own custom module. When you start your dev server, you run npm start or yarn start and then what do you do? You wait for the dev server to start. This waiting time depends on how big your project is and how many external modules you have imported in your project. As we start to add more and more functionalities to our project, the amount of JavaScript code that needs to be processed is also increased exponentially. Moreover, if we are not only using JavaScript files in the front end, there are a lot of CSS files, static images also. As a result, we reach a point where the bundling mechanism hits a point where it starts to bottleneck. How Vite can improve bundling performance There are two obvious problem with the bundling, Slow start of the dev server and Slow update. When you initially start your dev server, a bundler-based setup starts building your whole project before it can actually serve the browser with the necessary content. But Vite can improve the start of the dev server because it works in a bit different way. You may ask how. We can divide our project into two part. Dependencies Source Code How Vite helps to improve starting of the dev server Dependencies are something that do not change during the lifecycle of the development. They are mostly written in plain JavaScript that a browser can easily interpret. There are some large dependencies that can also take a lot of times to process. Source Code are often written in non plain JavaScript (e.g JSX, TSX, Vue) that needs to transformed into plain JavaScript. Also source code are often edited but not all of the source code is needed to be served at the same time. Vite processes Dependencies and Source Code differently. It pre-bundles dependencies using esbuild which is proven to be 10-100x faster than traditional JavaScript based bundler. And for the Source Code, Vite serves the source code over Native ESM, basically letting the browser to handle the job of bundling. Vite just transforms and serves the browser code on demand. Dynamic imports are only transformed if and only if it is used on the screen. How Vite hepls to improve on demand update of Source Code When a file is edited in the bundler-based build setup, the whole bundle that contains the source code is rebuilt by the bundler. For obvious reason, it seems inefficient to rebuild the whole bundle as only few lines has changed in the code. In some of the bundlers, dev server runs the bundling in memory that it needs to invalidate the part of the module graph when a file is changed. But yet it needs to rebuild the whole bundle and serve to the webpage. Reconstructing the bundle can be expensive, and reloading the page blows away the current state of the application. This is why some bundlers support Hot Module Replacement (HMR): allowing a module to “hot replace” itself without affecting the rest of the page. This greatly improves DX – however, in practice we’ve found that even HMR update speed deteriorates significantly as the size of the application grows. In Vite, HMR is performed over native ESM. When a file is edited, Vite only needs to precisely invalidate the chain between the edited module and its closest HMR boundary (most of the time only the module itself), making HMR updates consistently fast regardless of the size of your application. Vite also leverages HTTP headers to speed up full page reloads (again, let the browser do more work for us): source code module requests are made conditional via 304 Not Modified, and dependency module requests are strongly cached via Cache-Control: max-age=31536000,immutable so they don’t hit the server again once cached. Why Vite, not esbuild While esbuild is blazing fast and is already a very capable bundler for libraries, some of the important features needed for bundling applications are still work in progress – in particular code-splitting and CSS handling Configuring Vite with new project To start with Vite, it is quite easy. You just have to follow some basic instruction and command. In your root directory where you want to save your project, just run the following command: npm create vite@latest my-react-app or yarn create vite my-react-app You will be prompted to select the framework as below: Select the framework of your preference. After that you will be prompted to select framework language (i.e. JavaScript or TypeScript) Select your preference and you are good to go. In the directory just run:   Copy npm install npm install or Copy yarn install yarn install  

**Abul Hasnat**30 Jun 2023 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/35_Using_AWS_from_anywhere_in_the_world_with_serverless_architecture.webp)](https://www.craftsmensoftware.com/blog/using-aws-services-from-different-regions-using-serverless-architecture)

### [Using AWS Services from different regions using Serverless Architecture](https://www.craftsmensoftware.com/blog/using-aws-services-from-different-regions-using-serverless-architecture)

You’re sipping your morning coffee, scrolling through your favorite e-commerce site, and within seconds, the products load seamlessly. Whether you’re in Norway, New York, Tokyo, or Paris, the experience is just as smooth and fast. Ever wondered how these global companies manage to deliver such consistent performance? The secret lies in using AWS Services from different regions using Serverless Architecture! Today, we’re going to explore how leveraging AWS’s global infrastructure can revolutionize your business. We’ll break down why this approach is worth every penny, highlight the benefits, tech insights, and discuss why tech businesses are jumping on this trend. By the end, you’ll have a clear understanding of how to harness the power of AWS and serverless architecture to stay ahead of the competition. AWS comes with a bunch of cool services and most of the time not all the services are available in all the regions. At Craftsmen, while providing premium R&D services to our customers across the globe we encountered situations like this where our customers want to have services in certain regions where not all the services are available but they would like to use those services. In this article, we will discuss the solutions with appropriate Serverless architecture. Let’s Assume The Following Use Case We would like to have our system in Central Canada ca-central-1 and we would like to use the cognitive service of AWS like Rekognition to read texts from the images which is not available in Central Canada. To make the use case more simple let’s assume that we shall use DynamoDB as our No SQL database and S3 as file storage. Other variants of the above use case could be like below. The system needs to be deployed in North California (us-west-1) and the system needs to use AWS Transcribe. There Are Two Steps To Solving This Problem The first step is deciding on a robust distributed architecture and the second step is using the most simple and cost-effective way to glue them together. So let’s jump into the first step! Deciding The Architecture People want to use services close to their premises mostly to gain near to zero latency. The heart of Serverless architecture, the lambdas are available in all the regions being supported by AWS. In any system, there will be CRUD operations on data and DynamoDB is also available in all the regions. We shall accumulate our Lambdas and DynamoDB tables in one Cloud Formation Stack through our serverless.yml. Now the other parts that are not available in ca-central-1 ( Canada Central) we need to find the nearest regions where these services are available. Generally, these services do extensive processing of data that takes time and returns a result set. Here we are using AWS Rekognition which does process files from S3. Generally, these kinds of services can’t process on files that reside in S3 in other regions. So we shall accumulate AWS Rekognition and S3s in another Cloud Formation Stack and let’s assume that we are deploying this to us-east-2 (Ohio). Since we have now spitted architecture as can be seen by the above diagram. Still, we need to solve a big challenge, which is to ensure seamless communication between the resources across the regions ( stacks). There are several ways of doing it but I shall only cover the most simple one. In general, almost all the AWS services which do heavy computations notify the system either through Cloudwatch or through SNS. The limitation of these events is that they can’t go across the regions. AWS SQS comes here as a rescuer as it can be integrated with SNS or CloudWatch events of different regions. So particularly for this use case, we shall use an SNS-SQS pipeline to bridge between the stacks. It’s better to have the SQS in the same regions where we have the endpoints ( Lambdas). So the final architecture will look like below. Now there will be an obvious question like how to trigger the Rekognition operation from a lambda in the CA-CENTRAL-1 region. All you need is to instantiate the AWS Rekognition API by supplying the appropriate region which is US-EAST-2 and S3 bucket name of US-EAST-2. Why It’s Worth It Cost Efficiency: AWS serverless architecture allows you to pay only for what you use. You don’t have to worry about provisioning or managing servers, which can significantly reduce your operational costs. Scalability: Your applications can automatically scale up or down based on demand. This is particularly beneficial for businesses that experience variable traffic patterns, such as e-commerce platforms during holiday seasons. Global Reach: By deploying your services in different AWS regions, you can ensure low latency for users worldwide. This improves the user experience and can lead to higher customer satisfaction and retention. Benefits of Using AWS Services from Different Regions Enhanced Performance and Reliability: AWS has data centers in multiple regions across the globe. By leveraging these regions, you can ensure your application performs optimally for users regardless of their location. For instance, Netflix uses AWS to deliver high-quality streaming services to its global user base, ensuring minimal buffering and high availability. Disaster Recovery: Deploying your services across multiple regions helps in creating a robust disaster recovery plan. If one region goes down, your application can failover to another region, minimizing downtime and data loss. Compliance and Data Sovereignty: Different countries have varying regulations about data storage and processing. Using AWS services from different regions allows businesses to comply with these regulations by storing data within the required geographical boundaries. Why Tech Businesses Need to Implement It Competitive Advantage: In today’s fast-paced tech world, businesses need to deliver services quickly and reliably. By using AWS’s global infrastructure, companies can stay ahead of the competition by providing a seamless user experience. Focus on Core Business: With serverless architecture, developers can focus more on writing code and developing features rather than managing infrastructure. This leads to faster development cycles and quicker time-to-market. Cost Management: Serverless computing eliminates the need for upfront capital expenses on hardware. Businesses can start small and scale as needed, making it an attractive option for startups and established companies alike. Real-Life Examples Coca-Cola: During the 2014 FIFA World Cup, Coca-Cola used AWS to ensure their promotional campaigns ran smoothly across different regions. By using AWS Lambda and other serverless services, they managed to handle massive traffic spikes without any issues. Airbnb: Airbnb leverages AWS to provide a reliable and scalable platform for their users worldwide. By utilizing multiple AWS regions, they ensure that users can book accommodations and have a smooth experience regardless of their location. Quick Steps to Getting Started with AWS Serverless Architecture Choose Your Services: Start by identifying the AWS services you need. AWS Lambda, API Gateway, DynamoDB, and S3 are popular choices for serverless applications. Plan Your Regions: Decide which AWS regions you want to deploy your services in. Consider factors like user base, latency requirements, and regulatory compliance. Set Up Monitoring and Management: Use AWS CloudWatch for monitoring your serverless applications and AWS CloudFormation for managing your infrastructure as code. Optimize and Scale: Continuously monitor your applications and optimize them for performance and cost. AWS provides various tools and services to help you achieve this. Conclusion Leveraging AWS services across different regions with serverless architecture is a game-changer. This approach offers a compelling combination of cost efficiency, scalability, and enhanced performance that can transform your business operations. Embracing AWS services from different regions using serverless architecture is not just a technical decision; it’s a strategic business move.

**Mahmudul Haque Azad**09 Jun 2023 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Deploy_A_SPA_In_AWS_With_Domain_Or_Sub-Domain.webp)](https://www.craftsmensoftware.com/blog/deploy-a-spa-in-aws-with-domain-or-sub-domain)

### [Deploy a SPA in AWS with domain or sub-domain](https://www.craftsmensoftware.com/blog/deploy-a-spa-in-aws-with-domain-or-sub-domain)

Deploying Single Page Application (SPA) in Amazon Web Services (AWS) world is not that straight forward like the way SPA sounds. At Craftsmen we have been deploying SPAs in AWS cloud environment pretty frequently for our customers and thought that it’s worth sharing our practices with the world! Suppose you have a domain called www.example.com and you want to serve a SPA (built in React, Angular, VueJS etc) web app from AWS cloud environment. Then at a first glance you will face lots of confusing stuffs like S3 bucket, Route53, Cloud Front etc which will need to be configured properly. Lets discuss about them briefly and later we will see necessary configuration steps to make them work together. S3 Bucket: S3 is the simple cloud storage from AWS where you can store any type of file with access permissions. We will put our SPA app in a S3 bucket with public access permission, so that anyone can download files from this bucket. CloudFront: You can think Amazon CloudFront as a CDN. In our case it will cache our static web app from a S3 bucket and will deliver it more efficiently when requested. Route 53: You can consider Route 53 as the domain name resolver similar as NameCheap and other third parties. Necessary configurations in S3: At first we have to configure a S3 bucket which will act like a web server. Login to your AWS web console and select S3 from services. Create two buckets based on your domain and sub-domain name lets call example.com and dev.example.com. After creating the buckets, upload your SPA app files to the bucket and make all files publicly accessible from Permissions tab or from the “Actions” menu. Now from the “Properties” tab of the bucket configuration page click “Static website hosting” tile and give values as shown in the below image. Note the “Endpoint” URL, through which you should be able to access your web site after saving changes. Necessary configurations in CloudFront: We hosted our app in S3 bucket and now we want to deliver it through CloudFront for better performance and caching. Select CloudFront from service in AWS web console. Click the “Create Distribution” button and in the Web section click “Get Started” button. Paste the “website domain” part of the static assets bucket in Origin domain name . In our case it should be “dev.example.com.s3-website-\[zone\].amazonaws.com”, it will set the Origin ID automatically. Select “Redirect HTTP to HTTPS” in “Viewer Protocol Policy” if you want to deliver your site over HTTPS. Select “Redirect HTTP to HTTPS” in “Viewer Protocol Policy” if you want to deliver your site over HTTPS. In “SSL certificate” section select “Custom SSL Certificate (example.com)” if you already bought a SSL for this domain. In “Default root object” type “index.html”. Leave the other settings as they are and click the create distribution button. It will create a new distribution and will show the list of distributions, with a ID and a CloudFront domain name. At this moment we should be able to browse our site with the new CloudFront domain name when the status is changed to “Deployed”. For client side routing you may require to configure redirect rules in case of HTTP 404 error. Necessary configurations in Route 53: If you did not purchase your domain from AWS then following configurations needs to be done in your third party domain controller like NameCheap. After the status of new distribution changes to “Deployed”, move on to Route 53 to configure the domain controller to route traffic to the CloudFront if users hit “dev.example.com” or “example.com”. Create a new hosted zone for your domain in Route 53. Click on “Hosted zones” and then click example.com in the domain list and add a “A” record as shown below. Normally Route 53 takes up to 60 seconds to start routing to the CloudFront distribution. If everything goes right then the site should be available in dev.example.com.

**Hassanur Rahman**14 May 2023 Read →

[![Build REST API in 5 Minutes with FastAPI](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/FastAPI-Build-REST-API-in-5-minutes.webp)](https://www.craftsmensoftware.com/blog/build-rest-api-in-5-minutes)

### [Turbocharge Your Development: Build REST API in 5 Minutes with FastAPI](https://www.craftsmensoftware.com/blog/build-rest-api-in-5-minutes)

Whether you’re working on a personal project or building an enterprise-grade application, being able to quickly set up a REST API can save valuable time and resources. In this blog post, we’ll explore how you can build REST API in 5 Minutes with FastAPI, and we’ll delve into why it’s a game-changer for developers. Maybe we know FastAPI is a web framework of Python. The meaning of its name expresses what is more special about this framework than others. The very new features of Python async and await are here. The API is really fast like nodeJS and Go (They claimed). The more interesting thing is the implementation time of the REST API. The first endpoint will take at most five minutes to implement including the API docs. What I have discussed here is that you can find all those things in FastAPI official documentation. It is much richer than other web frameworks in Python. Almost everything you can find there. Let’s try to create your virtual environment.   Copy Python3 -m venv myenv Python3 -m venv myenv What Makes FastAPI Stand Out? Before diving into the steps of building a REST API, let’s first understand why FastAPI has become one of the most popular frameworks among developers: Blazing Fast Performance: FastAPI is one of the fastest Python frameworks available, rivaling the performance of Node.js and Go. This is thanks to its use of asynchronous programming and the Starlette framework underneath. It’s built on top of Starlette for the web parts and Pydantic for the data parts, making it incredibly efficient. Automatic Interactive Documentation: FastAPI automatically generates interactive API documentation (with Swagger UI and ReDoc) based on the structure of your API. This feature is particularly beneficial for larger teams, where clear communication of API endpoints is crucial. Easy Integration with Other Tools: FastAPI integrates smoothly with other Python libraries and tools. It works perfectly with SQLAlchemy for database management, Pydantic for data validation, and OAuth2 for security, among others. Developer-Friendly: With its support for Python-type hints, FastAPI provides enhanced editor support for auto-completion, type checking, and more. This makes the development process faster and reduces the risk of runtime errors. Built-In Validation: FastAPI uses Pydantic models to validate request data, which reduces the need for boilerplate code and ensures that your API endpoints are robust and error-free. Exploring FastAPI’s Effective Sides Beyond Basics FastAPI isn’t just about quickly building APIs; it offers several other advantages that can significantly enhance your development process: 1. Asynchronous Capabilities In a world where web applications need to handle a large number of concurrent users, asynchronous programming is essential. FastAPI’s design embraces async/await syntax, allowing you to write code that can handle multiple requests simultaneously without blocking operations. Example: Copy @app.get("/items/{item\_id}") async def read\_item(item\_id: int): return {"item\_id": item\_id} @app.get("/items/{item\_id}") async def read\_item(item\_id: int): return {"item\_id": item\_id} 2. Dependency Injection FastAPI’s dependency injection system is a powerful feature that allows you to inject dependencies into your endpoints. This is useful for handling complex logic, such as database connections, user authentication, or external API calls, without cluttering your endpoint logic. Example: Copy from fastapi import Depends def get\_db(): db = "database\_connection" try: yield db finally: pass # Cleanup code @app.get("/items/{item\_id}") def read\_item(item\_id: int, db=Depends(get\_db)): return {"item\_id": item\_id, "db": db} from fastapi import Depends def get\_db(): db = "database\_connection" try: yield db finally: pass # Cleanup code @app.get("/items/{item\_id}") def read\_item(item\_id: int, db=Depends(get\_db)): return {"item\_id": item\_id, "db": db}   3. Security and Authentication FastAPI makes it easy to implement security measures like OAuth2, JWT tokens, and API keys. You can secure your endpoints with minimal code, ensuring your API remains safe from unauthorized access. Example:   Copy from fastapi.security import OAuth2PasswordBearer oauth2\_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/users/me") async def read\_users\_me(token: str = Depends(oauth2\_scheme)): return {"token": token} from fastapi.security import OAuth2PasswordBearer oauth2\_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/users/me") async def read\_users\_me(token: str = Depends(oauth2\_scheme)): return {"token": token} 4. Data Validation and Serialization with Pydantic Pydantic is at the core of FastAPI’s data validation and serialization. You can define Pydantic models that describe the shape of your request and response data, and FastAPI will automatically validate incoming requests and serialize outgoing responses. Example: Copy from pydantic import BaseModel class Item(BaseModel): name: str description: str = None price: float tax: float = None @app.post("/items/") def create\_item(item: Item): return item from pydantic import BaseModel class Item(BaseModel): name: str description: str = None price: float tax: float = None @app.post("/items/") def create\_item(item: Item): return item Conclusion FastAPI isn’t just another Python web framework; it’s a strategic tool for developers who need to build efficient, scalable, and maintainable APIs quickly. Its combination of speed, ease of use, and robust features like automatic documentation, asynchronous capabilities, and built-in validation make it a go-to choice for both small and large projects. Whether you’re a seasoned developer or just starting, FastAPI offers a seamless experience that can help you accelerate your development process without compromising on performance or security. With just a few lines of code, you can have a fully functioning API ready to serve your application’s needs. So why wait? Start exploring FastAPI today and see how it can transform the way you build web applications.

**Md. Raisul Islam**08 May 2023 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Detecting_Faces_from_Videos.webp)](https://www.craftsmensoftware.com/blog/detecting-faces-from-videos-using-rekognition-in-serverless-architecture)

### [Detecting Faces from Videos using Rekognition in Serverless Architecture](https://www.craftsmensoftware.com/blog/detecting-faces-from-videos-using-rekognition-in-serverless-architecture)

You’re walking through an airport, and without a hitch, security systems recognize and verify your identity, ensuring a seamless experience from check-in to boarding. Or imagine a retail store that not only identifies loyal customers as they enter but also tailors special offers based on their past purchases and preferences. These scenarios aren’t scenes from a sci-fi movie—they’re real-world applications of face detection technology powered by Amazon Rekognition and serverless architecture. In this blog post, we’ll explore how you can leverage these cutting-edge technologies to detect faces from videos, making your systems smarter, faster, and more efficient. Whether you’re aiming to boost security, enhance customer experiences, or unlock new possibilities in your industry, understanding and implementing this technology can give you a significant edge. So, let’s dive in and see how detecting faces from videos using rekognition in a serverless setup can transform your tech landscape. Rekognition is a powerful image and video analysis service provided by AWS. It can identify objects, people, text, scenes, and activities in images and videos, as well as detect any inappropriate content. For face detection, Rekognition can locate faces within images and videos, analyze facial attributes (like age range, emotions, and gender), and even recognize individuals if you have a pre-existing collection of face data. With the rise of Artificial Intelligence and Cognitive Services, it’s now pretty easy to achieve things we used to hear as fairy tales or as science fiction in childhood. In a just matter of 10 years, we have seen servers shifting their places from delicate server rooms to clouds and now things are getting popular around serverless architecture. The software engineers of my company Craftsmen always work with bleeding-edge technologies like this. In this article, I am going to share an interesting topic based on the following architecture. We have few videos stored in S3 bucket. Also we have few images of people stored in another S3 bucket. Using some ‘magic’ we would like to know which people are being shown in which video and at what time. Here is the magic we shall use the AWS Rekognition service. Relevant code snippets are written in Node.js. I shall not show how to configure API Gateway with Lambda here as it can be easily done and if you find any difficulties please google it and you will find ample help from there :). Suppose we have a bunch of images of different people uploaded in an S3 bucket. The Rekognition engine does the facial analysis and faces recognition based on a collection of its own. We need to register these images for this collection. The face collection can be created using the following AWS CLI command. Needless to say that this collection can be created programmatically but in order to keep this article I am ignoring this here. Let’s assume that we have one CognitiveEngineApi exposed which takes a video item reference as an input. The Rekognition engine is an independent system and it communicates back with its processing status through SNS. This can be seen in the architecture diagram above. The following code snippet will trigger a face detection command in the CognitiveEngineApi. Upon completion of the analysis process, the Rekognition Engine will notify through SNS. So we need to have one more lambda which will be integrated with this SNS. Here we call this lambda as CognitiveServiceTrigger as can be seen in the architectural diagram above. If the analysis is completed successfully then in the SNS topic it sends the RekognitionJobId through which we can query the result from the Rekongnition Engine. Benefits of Using Rekognition and Serverless Architecture Scalability: Automatically scales to handle varying loads, ensuring that your application remains responsive even during peak times. Cost-Efficiency: You only pay for what you use. There are no upfront costs or infrastructure to maintain, which significantly reduces operational expenses. Simplified Management: No need to manage servers or infrastructure. AWS handles the heavy lifting, allowing you to focus on developing and deploying your application. Speed: Fast and efficient processing of video files, enabling real-time or near-real-time face detection. Flexibility: Easily integrates with other AWS services, allowing you to build comprehensive solutions tailored to your specific needs. Real-World Applications Amazon Rekognition and serverless architecture have been adopted by numerous companies across various industries. Here are some notable examples: 1. Security and Surveillance Company: Ring Application: Ring uses Amazon Rekognition to enhance its security cameras and doorbells. The face detection capabilities enable Ring devices to recognize familiar faces and notify homeowners of known visitors or potential intruders. Benefits: Enhanced security and peace of mind for homeowners, as well as improved response times in case of suspicious activity. 2. Retail and Marketing Company: Coca-Cola Application: Coca-Cola uses Rekognition to analyze customer demographics and emotions in retail environments. By understanding how customers interact with their products, Coca-Cola can tailor marketing strategies and improve customer experiences. Benefits: Better-targeted marketing campaigns, increased customer satisfaction, and higher sales conversion rates. 3. Entertainment Company: Netflix Application: Netflix leverages Rekognition to create interactive and personalized viewing experiences. By recognizing faces in user-uploaded content, Netflix can suggest relevant movies and shows that feature the user’s favorite actors. Benefits: Enhanced user engagement, personalized content recommendations, and increased viewer retention. Global Impact The integration of face detection technology with serverless architecture has a profound global impact. Here are some ways this combination is making a difference: 1. Improved Security Globally, organizations and governments are using face detection technology to enhance security measures. From airports to public spaces, the ability to detect and recognize faces in real-time helps prevent crime, identify suspects, and ensure public safety. 2. Healthcare Advancements In the healthcare sector, face detection technology is being used to monitor patients, detect signs of distress, and even diagnose certain medical conditions. For example, facial analysis can help identify early symptoms of diseases like Parkinson’s or monitor emotional well-being in mental health patients. 3. Disaster Response During natural disasters, face detection technology can be crucial for identifying and locating missing persons. By analyzing footage from drones or security cameras, rescue teams can quickly identify individuals and coordinate rescue efforts more effectively. 4. Enhanced Accessibility Face detection technology is also improving accessibility for people with disabilities. For instance, it can be used to create more intuitive and accessible interfaces for visually impaired users, enabling them to interact with devices and services more easily. Challenges and Considerations While the benefits of using Amazon Rekognition and serverless architecture are significant, it’s essential to consider some potential challenges and ethical considerations: 1. Privacy Concerns The use of face detection technology raises privacy concerns. Organizations must ensure that they comply with data protection regulations and implement robust measures to protect users’ personal information. 2. Bias and Fairness Face detection algorithms can sometimes exhibit bias, leading to unfair treatment or inaccurate results for certain demographic groups. Continuous monitoring and improvement of these algorithms are necessary to ensure fairness and accuracy. 3. Data Security Storing and processing sensitive data, such as facial images, requires stringent security measures. Organizations must implement best practices for data encryption, access control, and secure storage to prevent data breaches. Conclusion By following the steps outlined above, you can set up a scalable and cost-effective face detection system in no time. Whether you’re enhancing security, improving marketing strategies, or creating engaging user experiences, this technology opens up a world of possibilities. facedetectionResult is a JSON object which contains JobStatus and a map of detection person with relevant data. Details of which can be found at this link. Now depending on your business need you can extract and process data from the returned result which can be stored in DynamoDB ( or even in S3). So far I have discussed a pretty simple use case with the Rekognition engine but it’s possible to do incredible things with this engine like sentiment analysis, finding and reading text in images, and on video that is hard to see with the naked eyes, etc which we are doing at Craftsmen! If you are still reading this line then I hope, at least you got an idea about a standard serverless architecture with AWS Rekognition engine to do different ‘cognitive’ magic. Thanks for your time!

**Mahmudul Haque Azad**18 Apr 2023 Read →

[![](https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Fun-with-Factory-Design-Pattern-and-Python.webp)](https://www.craftsmensoftware.com/blog/fun-with-factory-design-pattern-and-python)

### [Fun with Factory Design Pattern and Python](https://www.craftsmensoftware.com/blog/fun-with-factory-design-pattern-and-python)

In the world of software engineering, design patterns serve as fundamental solutions to recurring problems in software design. These patterns are not tied to any specific programming language but offer universally accepted strategies for creating efficient, maintainable, and scalable code. One such essential pattern is the Factory Design Pattern and Python, categorized under creational patterns, which focuses on separating object creation from its usage. What is the design pattern/ Software design pattern? Consider a design pattern as the magic wand that every coder wishes they had, but more akin to a cheat code that is shared among developers globally. It’s like having a secret recipe for solving common problems in software. When pattern word comes to us what do we think? When software engineers try to solve a problem, always try to find a pattern that they already used before or try to create a new one. Because it is very important for future uses and others can understand it well. That’s why design pattern comes and there are some patterns that are approved worldwide. These are very much logical things. Not dependent on any programming language. In software engineering, a design pattern is a known repeatable solution to a commonly occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. (Collected from Source Making) What is a Factory Design Pattern? When I use the factory word you may have made a picture of a factory right? Don’t worry, you are right. Think about a factory where they produce cars. You don’t know how they do it. But you can order a car from there and you can ride it. This is actually a factory pattern says. Let’s read about the definition. The factory design pattern is a design pattern under the creational pattern, which is not exposing the creational logic to the users. This is one of the most used creational patterns by software engineers. Now let’s make some fun with the factory design pattern. I think the above bike factory image is enough to understand the whole logic of the factory design pattern. Specialties of this pattern Separate creation from uses Does not expose the creational logic to users Makes code more robust, less coupled, and easy to implement You can extend without touching the original code. Almost many object creational problems can be solved by this pattern Now let’s try to draw a UML diagram for the factory pattern. Now it’s time to implement this pattern using Python code. Let’s create an Abstract bike class. Copy Benefits of The Factory Design Pattern By separating the creation of objects from their use, it facilitates code simplification and encourages a clearer structure. Encapsulating the creation logic improves the scalability and maintainability of the code. It can be extended to create new objects without changing the existing code, which makes it flexible enough to adjust to evolving needs. This pattern can be used to solve a lot of software engineering object creation problems. Conclusion One effective method for controlling object creation in software development is the Python Factory Design Pattern. It improves readability and organization of the code while enabling extensibility and robustness through the use of abstraction and encapsulation. Developers can create scalable and effective applications by understanding and putting the Factory Design Pattern into practice. This applies to both simple and complex objects. Adopt this pattern to simplify your software design and provide well-organized, easily maintainable code for your projects.

**Md. Raisul Islam**12 Apr 2023 Read →

[←](https://www.craftsmensoftware.com/blog/page/7#articles) [1](https://www.craftsmensoftware.com/blog/#articles) … [7](https://www.craftsmensoftware.com/blog/page/7#articles)

8

[9](https://www.craftsmensoftware.com/blog/page/9#articles) … [11](https://www.craftsmensoftware.com/blog/page/11#articles) [→](https://www.craftsmensoftware.com/blog/page/9#articles)

## Looking for A Trusted AI-native Partner?

Our engineers work inside your product team, bringing broadcast experience and AI-native workflows. Let’s talk about your platform, your roadmap and where you need support.

[Book a Strategy Call →](https://www.craftsmensoftware.com/contact-us)

[![Mahmudul Haque Azad](https://www.craftsmensoftware.com/hs-fs/hubfs/Azad_bhai_new_DP__grey_BG.png?width=58&height=58&name=Azad_bhai_new_DP__grey_BG.png) Book Free 1:1 with Mahmudul Haque Azad CEO & Janitor, Craftsmen](https://www.craftsmensoftware.com/contact-us)

![](https://www.craftsmensoftware.com/hs-fs/hubfs/Azad_bhai_new_DP__grey_BG.png?width=46&height=46&name=Azad_bhai_new_DP__grey_BG.png)

Book Free 1:1 with Mahmudul Haque Azad

CEO & Janitor, Craftsmen

Loading calendar…

### ABOUT CRAFTSMEN

[The Team](https://www.craftsmensoftware.com/about-us)[Our Partnership Model](https://www.craftsmensoftware.com/how-we-work)[Client Stories](https://www.craftsmensoftware.com/client-success-stories)[Career](https://careers.craftsmensoftware.com/)[FAQ](https://www.craftsmensoftware.com/faq)[Privacy Policy](https://www.craftsmensoftware.com/privacy-policy)

<https://www.linkedin.com/company/craftsmensoftware/><https://www.youtube.com/@craftsmensoftware>

### HEADQUARTERS

Craftsmen UK

One Sovereign Quay, Bridge End, Leeds, West Yorkshire LS1 4AG, United Kingdom

### OPERATIONAL HUB

Craftsmen Bangladesh

Plot # 316, Lane # 4, DOHS Baridhara, Dhaka 1206, Bangladesh

### SALES & PARTNERSHIP

Craftsmen Norway

Kong Oscars gate 66, 68, 5017 Bergen, Norway

Craftsmen France

6 Avenue Pierre Grenier, 92100 Boulogne-Billancourt, Paris, France

### A TEAM YOU CAN TRUST

[![ISO 9001 certified](https://crafty-astro-2-0.skarif2.workers.dev/_astro/iso-9001.rB3N1YoH_19riAQ.webp)](https://www.craftsmensoftware.com/trust-centre)[![ISO 27001 certified](https://crafty-astro-2-0.skarif2.workers.dev/_astro/iso-27001.Ds31wC1E_Z2lNtpQ.webp)](https://www.craftsmensoftware.com/trust-centre)[![ISO 27701 certified](https://crafty-astro-2-0.skarif2.workers.dev/_astro/iso-27701.qBI_Bjkt_Z1J5MRi.webp)](https://www.craftsmensoftware.com/trust-centre)

[![Glassdoor reviews](https://crafty-astro-2-0.skarif2.workers.dev/_astro/glassdoor.C76Qo6k3_Z1Br5vs.webp)](https://www.glassdoor.com/Overview/Working-at-Craftsmen-EI_IE3004266.11,20.htm)[![GoodFirms, top software development company in Bangladesh](https://crafty-astro-2-0.skarif2.workers.dev/_astro/goodfirms.CJaHzqAg_1xfRU9.webp)](https://www.craftsmensoftware.com/blog/craftsmen-thrives-at-goodfirms-by-offering-scalable-robust-software-solutions-developed-with-quality-by-maestros)

© 2026 Craftsmen. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://www.craftsmensoftware.com/#organization",
  "@type" : "Organization",
  "address" : {
    "@type" : "PostalAddress",
    "addressCountry" : "GB",
    "addressLocality" : "Leeds",
    "addressRegion" : "West Yorkshire",
    "postalCode" : "LS1 4AG",
    "streetAddress" : "One Sovereign Quay, Bridge End"
  },
  "alternateName" : "Craftsmen Software",
  "areaServed" : [ "Norway", "Sweden", "United Kingdom", "Germany", "Spain", "United States" ],
  "contactPoint" : {
    "@type" : "ContactPoint",
    "availableLanguage" : [ "English", "Norwegian" ],
    "contactType" : "sales",
    "url" : "https://www.craftsmensoftware.com/contact-us"
  },
  "description" : "Craftsmen is an AI-native software engineering partner. We build dedicated engineering teams for companies in Europe and the US, and have worked with media and broadcast technology companies since 2011.",
  "founder" : {
    "@type" : "Person",
    "jobTitle" : "Founder & CEO",
    "name" : "Mahmudul Haque Azad"
  },
  "knowsAbout" : [ "Software team extension", "Dedicated software engineering teams", "Media and broadcast software", "Live streaming engineering", "Cloud-native engineering on AWS", "Legacy software modernisation" ],
  "legalName" : "Craftsmen Ltd.",
  "location" : [ {
    "@type" : "Place",
    "address" : {
      "@type" : "PostalAddress",
      "addressCountry" : "GB",
      "addressLocality" : "Leeds",
      "addressRegion" : "West Yorkshire",
      "postalCode" : "LS1 4AG",
      "streetAddress" : "One Sovereign Quay, Bridge End"
    },
    "name" : "Craftsmen UK (headquarters)"
  }, {
    "@type" : "Place",
    "address" : {
      "@type" : "PostalAddress",
      "addressCountry" : "NO",
      "addressLocality" : "Bergen",
      "postalCode" : "5017",
      "streetAddress" : "Kong Oscars gate 66, 68"
    },
    "name" : "Craftsmen Norway"
  }, {
    "@type" : "Place",
    "address" : {
      "@type" : "PostalAddress",
      "addressCountry" : "FR",
      "addressLocality" : "Boulogne-Billancourt",
      "postalCode" : "92100",
      "streetAddress" : "6 Avenue Pierre Grenier"
    },
    "name" : "Craftsmen France"
  }, {
    "@type" : "Place",
    "address" : {
      "@type" : "PostalAddress",
      "addressCountry" : "BD",
      "addressLocality" : "Dhaka",
      "postalCode" : "1206",
      "streetAddress" : "Plot # 316, Lane # 4, DOHS Baridhara"
    },
    "name" : "Craftsmen Bangladesh (operational hub)"
  } ],
  "logo" : "https://www.craftsmensoftware.com/hubfs/Craftsmen%20Logo_Black.png",
  "name" : "Craftsmen",
  "sameAs" : [ "https://www.linkedin.com/company/craftsmensoftware/", "https://www.facebook.com/craftsmenltd", "https://www.youtube.com/@craftsmensoftware" ],
  "url" : "https://www.craftsmensoftware.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://www.craftsmensoftware.com/#website",
  "@type" : "WebSite",
  "inLanguage" : [ "en", "nb" ],
  "name" : "Craftsmen",
  "publisher" : {
    "@id" : "https://www.craftsmensoftware.com/#organization"
  },
  "url" : "https://www.craftsmensoftware.com/"
}
```