Skip to content

Developed a backend code that integrates AWS DynamoDB using Python's boto3 library to performs CRUD operations and query movies information to cloud database.

Notifications You must be signed in to change notification settings

kunjp19/Aws-DynamoDB-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-DynamoDB

The prod.films DynamoDB table stores stores data for various films.

Each Item in the prod.films table contains 5 Attributes:

  • filmName - the name of the film, a DynamoDB String.
  • directorName - the name of the director who directed the film, a DynamoDB String.
  • length - the duration of the film in minutes, a DynamoDB Number.
  • rating - the IMDb rating for the film, a DynamoDB Number.
  • releaseDate - the date in which the film was released in the United Kingdom, a DynamoDB String.

The filmName is the Hash (Partition) Key of the table. The prod.films table also contains one Global Secondary Index (GSI) called DirectorName. The Hash Key of this index is the directorName attribute.

An example Item from the table, in JSON format, is given below:

{
  "filmName": "Batman Begins",
  "directorName": "Christopher Nolan"
  "length": 140,
  "rating": 8.2,
  "releaseDate": "2006-06-16"
}

Your Task

You are required to implement the all the methods marked with TODO Implement in the FilmsDBService and FilmDataStatsGenerator classes in such a way that all the unit tests in test/test_films_data_stats_generator.py pass.

FilmsDBService should be implemented in such a way that you only need to query the prod.films table once per full run of the test/test_films_data_stats_generator.py test suite.

Requirements

The test/test_films_data_stats_generator.py file should not be modified. If you would like to add your own unit tests, you can add these in a separate file.

The requirements.txt file should only be modified to add any third-party dependencies required for your solution.
Please note that all third-party depdencies required for your solution MUST be added to the requirements.txt file.

You must use the AWS DynamoDB SDK Python (Boto 3) library to work with DynamoDB. The dependency for this library has already been added to the requirements.txt file.

Apart from that, you are free to use whichever libraries you want (Python or third-party) when implementing your solution.
Note we recommend using the Python datetime library for working with dates.

Your solution also must use/be compatible with Python version 3.7.

This test should take no longer than 2 hours to complete successfully.

Good luck!

Submitting your solution

Please push your changes to the master branch of this repository. You can push one or more commits.

Once you are finished with the task, please click the Complete task link on this screen.

About

Developed a backend code that integrates AWS DynamoDB using Python's boto3 library to performs CRUD operations and query movies information to cloud database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages