How to read data from AWS DynamoDB tables using AWS Lambda. get, scan and query methods(Node.js).
AWS , Cloud , Uncategorized / March 30, 2020

This tutorial aims at explaining how to read data from the AWS DynamoDB table. AWS SDK has a class AWS.DynamoDB.DocumentClient, which has methods scan, get and query, that are used to read data from the AWS DynamoDB table.  Documentation on various methods provided by the class is available from the following link AWS.DynamoDB.DocumentClient – Documentation.   Table structure primary partition key – name sort key – age table name – testTable This may not be the ideal table structure but here we use it just as an example.     step 1: Executing the query to get all data from a table – scan method. The scan method is used to  read every item in the table and returns all the data in the table. Filters can be also applied First of all, we create an object scanningPrams which has all the params including the table name, required to scan the DynamoDB table. Simple params to get 10 items from a table “testTable“, would look like this.

The output will have the following structure

The output will have three properties:  Items will have the queried items, ScannedCount will have the number of items evaluated before any scanFilter is…

Advanced interview questions for web application server-side/ back-end developers, Node.js – Part1

Here are some interview questions that Lead backend developers, with experience of  3+ years, usually face during interviews. QUESTIONS What are authentication and authorization? What is OAuth? What are API gateways and advantages of using them? Which is the best place to store session_ids or access_tokens. What are the different types of client-side storages and their differences?  What are middlewares? What is CORS(Cross-origin resource sharing), what is the importance and how to handle CORS? Describe microservices, web services, and APIs? How to validate requests while building REST APIs and why it is important? Explain the difference between SQL databases and NoSQL databases? Explain callbacks We have foreach loop and in each, we will have asynchronous operations. How to handle this case? ANSWERS Authentication is about verifying user identity and authorization is about checking whether a resource can be accessed. Authorization is not about user identity, it is about whether a requester can be granted permission to access a resource. Authentication is about verifying a user’s identity. Authentication and authorization are used together for providing security to a system. Here is a very useful article to learn the differences between authentication and authorization. This article also explains how these two are…

Steps for creating an EC2 instance and setting up Git remote repository, with detailed descriptions.
AWS , Cloud , Uncategorized / March 26, 2020

Here are the steps to create an EC2(Amazon Elastic Compute Cloud), set up your Git remote repository in EC2 and connect to the remote repo from your local machine. Some explanations are provided for better understanding. AWS Elastic Compute Service(EC2) is IaaS(Infrastructure as a Service).   PART 1 – Creating and connecting to AWS EC2 Virtual Machine instance.   STEP 1  – Go to AWS console. STEP 2 – goto services, click on EC2 and create a virtual machine by clicking on the launch instance button. EC2 is IAAS just like a compute engine in google. STEP 3 – Amazon has provided templates for engines with different OS and processor combinations. Choose one option and move forward. Select according to your needs and click on launch. STEP 4 – On clicking the launch button amazon asks to create or choose a  key-value pair. A key pair consists of a public key that AWS stores, and a private key file that you store. You have to provide the private key name. A .pem file with the key will be downloaded which is the private key. Public-key cryptography, or asymmetric cryptography, is a cryptographic system that uses pairs of keys: public keys which may be disseminated…

Share this page in social media platforms