diff --git a/awscli/customizations/binaryformat.py b/awscli/customizations/binaryformat.py index dd8f4c7021fd..936ce19fe9be 100644 --- a/awscli/customizations/binaryformat.py +++ b/awscli/customizations/binaryformat.py @@ -56,7 +56,7 @@ def _visit_scalar(self, parent, shape, name, value): if shape.type_name != 'blob' or not isinstance(value, six.text_type): return try: - parent[name] = base64.b64decode(value) + parent[name] = base64.b64decode(value, validate=True) except (binascii.Error, TypeError): raise InvalidBase64Error('Invalid base64: "%s"' % value)