Fix test for boto3
 - [ ] closes #17135
 - [ ] tests added / passed
 - [ ] passes ``git diff upstream/master -u -- "*.py" | flake8 --diff``
 - [ ] whatsnew entry

This is a failing test for #17135 to reproduce the behavior.