Leveraging AWS Elasticsearch

Recently I had an use case where I had to expose AWS DynamoDB search as an API.  I could have gone with the common approach of using AWS API Gateway integrating with AWS Lambda which runs the search against the AWS DynamoDB as  




however this approach wouldn't be scalable under load. 

Alternative to the above solution would be to use AWS Elasticsearch ServiceElasticSearch is an open source product from Elastic that’s is designed to help us search in a way that is highly available and abstracted from datastore. AWS Elasticsearch Service is AWS hosted ElasticSearch that takes care of set-up and management of the back end server and provides us with an endpoint that we can get developing with. AWS Elasticsearch Service makes it easy to deploy, secure, operate, and scale Elasticsearch for log analytics, full text search, application monitoring, and more. AWS Elasticsearch Service is a fully managed service that delivers Elasticsearch’s easy-to-use APIs and real-time analytics capabilities alongside the availability, scalability, and security that production workloads require. The service offers built-in integrations with KibanaLogstash, and AWS services including Amazon Virtual Private Cloud (VPC)AWS Key Management Service (KMS)Amazon Kinesis Data FirehoseAWS LambdaAmazon Cognito and Amazon CloudWatch so that you can go from raw data to actionable insights quickly and securely.


Above solution can be re-architected as 







APIGW2ES Lambda function is to pass the search request from API Gateway to Elasticsearch. Example to get info from Elasticsearch via AWS Lambda can be referred here 

DDB2ES Lambda function is to poll the DynamoDB for any addition of record and send to Elasticsearch for indexing. Example for pushing records from DynamoDB to ES can be referred here  

Comments

Popular posts from this blog

Validate Cognito tokens in Kong

Tracing Requests in AWS Serverless Applications