sunmingtao / sample-code

3 stars 4 forks source link

AWS s3 presign URL: <Code>NoSuchKey</Code> #131

Closed sunmingtao closed 4 years ago

sunmingtao commented 4 years ago

Run aws s3 presign s3://smt0002/snake.png --expires-in=600 --region ap-southeast-2 Hit the generated URL in the browser

<Error>
    <Code>NoSuchKey</Code>
    <Message>The specified key does not exist.</Message>
    <Key>snake.png</Key>
    <RequestId>93BE9798AF5BDA70</RequestId>
    <HostId>
        fCUS97aoCzy+sriGCL4XV8aYV6kpFcLyYzaJrIheebGMAuySaBMhkJGNYg+1FBxS50ynfAOmH6A=
    </HostId>
</Error>
sunmingtao commented 4 years ago

It mixed up the bucket name. Should be smt0004 instead of smt0002