def full_dynamodb_stream_arn(table_name)
      return table_name if table_name.include?("arn:aws:dynamodb") # assume full stream arn

      begin
        resp = dynamodb.describe_table(table_name: table_name)
      rescue Aws::DynamoDB::Errors::ResourceNotFoundException => e
        puts e.message
        puts "ERROR: Was not able to find the DynamoDB table: #{table_name}.".color(:red)
        code_line = caller.grep(%r{/app/jobs}).first
        puts "Please check: #{code_line}"
        puts "Exiting"
        exit 1
      end
      stream_arn = resp.table.latest_stream_arn
      return stream_arn if stream_arn
    end
def full_dynamodb_stream_arn(table_name)
      return table_name if table_name.include?("arn:aws:dynamodb") # assume full stream arn

      begin
        resp = dynamodb.describe_table(table_name: table_name)
      rescue Aws::DynamoDB::Errors::ResourceNotFoundException => e
        puts e.message
        puts "ERROR: Was not able to find the DynamoDB table: #{table_name}.".color(:red)
        code_line = caller.grep(%r{/app/jobs}).first
        puts "Please check: #{code_line}"
        puts "Exiting"
        exit 1
      end
      stream_arn = resp.table.latest_stream_arn
      return stream_arn if stream_arn
    end
Expands table name to the full stream arn. Example:

   test-table
 To:
   arn:aws:dynamodb:us-west-2:112233445566:table/test-table/stream/2019-02-15T21:41:15.217

 Note, this does not check if the stream has been disabled.