2017-11-02 1 views
0

에 KMS ID로 메시지를 보내 CLI 명령AWS의 SQS는 내가 SQS 대기열이 <code>send-message</code>를 사용하는 경우</p> <p>내가 KMS에게 키 ID를 추가 할 <code>--message-attributes</code> 구문 권리를 얻을 수없는 KMS 고객 마스터 키 (CMK) 암호화가 CLI

aws sqs send-message --queue-url "queue/url" --message-body "testing" --message-attributes '{"keyId": {"DataType":"String", "StringValue":"mKeyId"}}' 

오류는 I이다

An error occurred (KMS.NotFoundException) when calling the SendMessage operation: Invalid keyId (Service: AWSKMS; Status Code: 400; Error Code: NotFoundException; Request ID: 02cae15e-bf78-11e7-c001-f9dff348cb7e) 

의 핵심은 올바른 열쇠 다시 얻고, 또한 키 별명 시도했습니다.

내가 구문을 잘못 얻고 무엇 SQS docs

에서 아무것도 찾을 수 없습니다

?

답변

1

내가 cloudformation를 통해 나쁜 큐를 생성 밝혀

SQS에 대한 Cloudformation의 문서를 읽을 때, KmsMasterKeyId 나는 SSE를 관리하는 AWS를 사용하는 경우에만 별칭을 사용해야 내 CMK 별칭 ( /alias/aws/sqs)를 포함했다

.

내 실제 키 ID로 업데이트, 내가 사용하는 CLI 명령이 잘 작동

aws sqs send-message --queue-url "queue/url" --message-body "testing" --message-attributes '{"keyId": {"DataType":"String", "StringValue":"mKeyId"}}' 
관련 문제