diff --git a/plugins/modules/dynamodb_table.py b/plugins/modules/dynamodb_table.py index ef212bf70cf..61b22e1eba4 100644 --- a/plugins/modules/dynamodb_table.py +++ b/plugins/modules/dynamodb_table.py @@ -125,7 +125,6 @@ description: - The class of the table choices: ['STANDARD', 'STANDARD_INFREQUENT_ACCESS'] - default: 'STANDARD' type: str version_added: 3.1.0 tags: @@ -777,12 +776,8 @@ def _update_table(current_table): # Update table_class use exisiting if none is defined if module.params.get('table_class'): - table_class = module.params.get('table_class') - else: - table_class = current_table.get('table_class') - - if table_class != current_table.get('billing_mode'): - changes['TableClass'] = table_class + if module.params.get('table_class') != current_table.get('billing_mode'): + changes['TableClass'] = module.params.get('table_class') global_index_changes = _global_index_changes(current_table) if global_index_changes: