Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying DynamoDB Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
DynamoDB Cookbook

DynamoDB Cookbook

By : Deshpande
3.9 (8)
close
close
DynamoDB Cookbook

DynamoDB Cookbook

3.9 (8)
By: Deshpande

Overview of this book

AWS DynamoDB is an excellent example of a production-ready NoSQL database. In recent years, DynamoDB has been able to attract many customers because of its features like high-availability, reliability and infinite scalability. DynamoDB can be easily integrated with massive data crunching tools like Hadoop /EMR, which is an essential part of this data-driven world and hence it is widely accepted. The cost and time-efficient design makes DynamoDB stand out amongst its peers. The design of DynamoDB is so neat and clean that it has inspired many NoSQL databases to simply follow it. This book will get your hands on some engineering best practices DynamoDB engineers use, which can be used in your day-to-day life to build robust and scalable applications. You will start by operating with DynamoDB tables and learn to manipulate items and manage indexes. You will also discover how to easily integrate applications with other AWS services like EMR, S3, CloudSearch, RedShift etc. A couple of chapters talk in detail about how to use DynamoDB as a backend database and hosting it on AWS ElasticBean. This book will also focus on security measures of DynamoDB as well by providing techniques on data encryption, masking etc. By the end of the book you’ll be adroit in designing web and mobile applications using DynamoDB and host it on cloud.
Table of Contents (12 chapters)
close
close
11
Index

Developing services for the sign-in activity for web applications

In the earlier recipe, we wrote and tested services for user registration. In this recipe, we will implement services for the user sign-in.

Getting ready

To get started with this recipe, you should have performed the earlier recipe.

How to do it…

For this recipe, we will use the same project that we created earlier:

  1. To start with, we use the same user model that we defined in the earlier recipe. As we had encrypted the password during registration, it is very important to use the same client, which was initiated by the encryption provider:
    static AmazonDynamoDBClient client = new AmazonDynamoDBClient(
          new ClasspathPropertiesFileCredentialsProvider());
    static DynamoDBMapper mapper = new DynamoDBMapper(client,
      DynamoDBMapperConfig.DEFAULT, new AttributeEncryptor(
          EncryptorProvider.getProvider()));
    static {
    client.setRegion(Region.getRegion(Regions.US_WEST_2));
    }
  2. Next, we write a method which will fetch the user...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY