Programmatically check table exist in AWS Dynamo DB from Lambda function

twitter logo github logo ・1 min read

public boolean isTableExist(String tableName) {
        try {
            TableDescription tableDescription = dynamoDB.getTable(tableName).describe();
            System.out.println('Table description: ' + tableDescription.getTableStatus());

            return true;
        } catch (com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException rnfe) {
            System.out.println("Table does not exist");
        }
        return false;

    }

Follow me in Twitter
https://twitter.com/muthupandian_in

twitter logo DISCUSS
Classic DEV Post from Dec 22 '18

Generate and Set Pseudorandom Hexadecimal Background Color Using JavaScript

I'm working on a project that deals with pseudo random event-driven color chang...

muTheTechie profile image
Loving #opensource #AWS #python