aws / aws/aws-cli

AWS CLI failed when using Non ASCII characters as object metadata values

Open
#6,712 8 comments 0 reactions 0 assignees View on GitHub
bug p2 unicode
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

Confirm by changing [ ] to [x] below:
- [x ] I've gone though the [User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) and the [API reference](https://docs.aws.amazon.com/cli/latest/reference/)
- [ x] I've searched for [previous similar issues](https://github.com/aws/aws-cli/issues) and didn't find any solution

Issue is about usage on:
- [ ] Service API : I want to do X using Y service, what should I do?
- [ ] CLI : passing arguments or cli configurations.
- [x] Other/Not sure.

**Platform/OS/Hardware/Device**
What are you running the cli on?

**Describe the question**
From the AWS S3 documentation,Amazon S3 allows arbitrary Unicode characters in metadata values。
However, when i try to adding a Non ASCII character as the metadata values, the cli directly failed.
From my opinion, the cli should only check the S3 object metadata key, without the need of checking metadata values.

root@vm102 ~/x/test# aws s3api put-object --bucket xd-bk-1 --key test --body 4M_zero --metadata aa="中"

Parameter validation failed:
Non ascii characters found in S3 metadata for key "aa", value: "中".
S3 metadata can only contain ASCII characters.

**Logs/output**
Get full traceback and error logs by adding `--debug` to the command.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.