Trusted Key Groups - InvalidKey

0

I'm trying to use Trusted Key Groups in CloudFront and I'm getting the below message

<Error> <Code>InvalidKey</Code> <Message>Unknown Key</Message> </Error>

The way I created the signed URL is.

  1. I went to Security credentials, created ** CloudFront key pairs** and then download the private and public key.
  2. I then went into CloudFront and copied and pasted the public key I got from the first step into there.
  3. Created the **Keygroup **and selected the above Public Key.
  4. I went to the CloudFront distribution, then to Behavior and selected Restrict viewer access then Trusted key groups (recommended) and chose the group I created above.
  5. I used CLI to generate a signed url

aws cloudfront sign --url domain.com/index.html --key-pair-id A*** --private-key file://pk-A***.pem --date-less-than 2060-01-01

LV
已提問 6 個月前檢視次數 107 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南