As it says on the tin. You create a command name which is egrep '2019-05-11|Total' and then try to call it. This is not a egrep followed by a parameter but a complete command name. What you want is more likely:
totalSize=$(echo $s3ls| egrep "$currentDate|Total" | awk -F 'Total Size:' '{print $2}'|sed '/^$/d')
If necessary you can use a variable to hold the parameter:
egrepParm="$currentDate|Total"
totalSize=$(echo $s3ls| egrep "$egrepParm" | awk -F 'Total Size:' '{print $2}'|sed '/^$/d')