How to use AWS Rekognition for Image Analysis using Lambda Function

In this blog, I am going to show you how we can use rekognition for image analysis using lambda function.we will be going to perform label detection and object detection for an image so basically we are performing image analysis in this blog.

What is AWS Rekognition?

Rekognition is one of the AWS services to perform image and video analysis. So here all we need to provide is the image or video to the AWS Rekognition service and it will help us to identify an object, people, text, activities, and scenes.

Benefits of using Amazon Rekognition are as follows:

  1. Integrating powerful image and video analysis into your apps.
  2. Deep learning-based image and video analysis.
  3. Scalable image analysis.
  4. Integration with other AWS services.
  5. Low cost

Common use cases for using Amazon Rekognition mentioned in the following:

  1. Searchable image and video libraries
  2. Face-based user verification
  3. Sentiment and demographic analysis
  4. Facial Search
  5. Unsafe content detection
  6. Celebrity recognition
  7. Text detection
  8. Custom labels

For Image analysis, we are using four services of AWS.

  1. IAM
  2. S3
  3. Lamda
  4. Rekognition[This service we are using within the lambda function]

So the flow for image analysis will be:

  • Firstly, we are going to read an image from the S3 bucket via a lambda function.
  • And in the second step we will pass that image to rekognition service via calling rekognition API. In response to this, rekognition API will return labels.

#aws #image #developer

What is GEEK

Buddha Community

How to use AWS Rekognition for Image Analysis using Lambda Function
Luna  Hermann

Luna Hermann

1594377780

Calling an AWS Lambda function from another Lambda function

In this article, I am going to explain how to create an AWS Lambda function and then call this function from another Lambda function within the same region. This is a useful scenario in which we may need to execute a second lambda function based on the outcome of some previous logic. Another scenario may be to execute a second lambda function several times by using different parameters.

For the sake of this article, we will consider a typical retailer application, in which we can purchase different products from a retailer site using a lambda function.

Architecture Diagram

Figure 1 – Architecture Diagram

If you consider the above architecture diagram, you can see that we have an AWS lambda function – the ParentFunction, which assumes a specific role from the IAM (Invoke Other Lambda Function) and then calls another lambda function – the ChildFunction with a payload. Once the execution of the ChildFunction is completed, it returns a response, which is then passed on to the ParentFunction. The ParentFunction receives the response and handles the job accordingly.

As in this example, let us assume that the ParentFunction is going to call the ChildFunction with a payload of ProductName, Quantity, and the UnitPrice of that product. The ChildFunction, in turn, will process this payload, calculate the total sales amount, generate a transaction reference ID, and return this information to the ParentFunction.

Creating the first AWS Lambda Function – ChildFunction

Let us first go ahead and create the ChildFunction, which will process the input payload and return the results to the ParentFunction.

#aws rds #functions #aws #lambda function

Ray  Patel

Ray Patel

1619510796

Lambda, Map, Filter functions in python

Welcome to my Blog, In this article, we will learn python lambda function, Map function, and filter function.

Lambda function in python: Lambda is a one line anonymous function and lambda takes any number of arguments but can only have one expression and python lambda syntax is

Syntax: x = lambda arguments : expression

Now i will show you some python lambda function examples:

#python #anonymous function python #filter function in python #lambda #lambda python 3 #map python #python filter #python filter lambda #python lambda #python lambda examples #python map

Cross-account access to invoke AWS lambda using AWS CDK

If you are here, you may have a pretty good knowledge of how to use AWS CDK for defining cloud infrastructure in code and provisioning it through AWS. So let’s get started on how to grant permission to your lambda function to access the resources in another AWS account.

Let’s say you have two accounts called Account A and Account B, and you need to give permission to lambda function in Account A (ex: 11111111)to access the resources in Account B(22222222). You can easily do this by assuming an IAM Role in Account B and then uses the returned credentials to invoke AWS resources in Account B.

#acces #account #aws #lambda #aws lambda #aws cdk

How to use AWS Rekognition for Image Analysis using Lambda Function

In this blog, I am going to show you how we can use rekognition for image analysis using lambda function.we will be going to perform label detection and object detection for an image so basically we are performing image analysis in this blog.

What is AWS Rekognition?

Rekognition is one of the AWS services to perform image and video analysis. So here all we need to provide is the image or video to the AWS Rekognition service and it will help us to identify an object, people, text, activities, and scenes.

Benefits of using Amazon Rekognition are as follows:

  1. Integrating powerful image and video analysis into your apps.
  2. Deep learning-based image and video analysis.
  3. Scalable image analysis.
  4. Integration with other AWS services.
  5. Low cost

Common use cases for using Amazon Rekognition mentioned in the following:

  1. Searchable image and video libraries
  2. Face-based user verification
  3. Sentiment and demographic analysis
  4. Facial Search
  5. Unsafe content detection
  6. Celebrity recognition
  7. Text detection
  8. Custom labels

For Image analysis, we are using four services of AWS.

  1. IAM
  2. S3
  3. Lamda
  4. Rekognition[This service we are using within the lambda function]

So the flow for image analysis will be:

  • Firstly, we are going to read an image from the S3 bucket via a lambda function.
  • And in the second step we will pass that image to rekognition service via calling rekognition API. In response to this, rekognition API will return labels.

#aws #image #developer

Cache secrets using AWS Lambda extensions

What is the AWS Lambda extension?

A month back AWS announced a preview of Lambda Extensions, a new way to easily integrate Lambda with your favorite monitoring, observability, security, and governance tools. Extensions can be published as Lambda layers, there are two types are extension:

  • Internal extensions → Run as part of the runtime process, in-process with your code. Internal extensions enable use cases such as automatically instrumenting code.
  • External extensions → Allow you to run separate processes from the runtime but still within the same execution environment as the Lambda function. External extensions can start before the runtime process and can continue after the runtime shuts down. These extensions run as companion processes to Lambda functions.

#aws #aws-secrets-manager #lambda #aws lambda