Fix dynamo scan to make segment and total segments work.
And in the first SNS endpoint 'publish'.