boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

后端 未结 9 1086
感情败类
感情败类 2020-11-29 19:13

I\'m trying to get django to upload static files to S3, but istead I\'m getting a 403 forbidden error, and I\'m not sure why.

Full Stacktrace:

相关标签:
9条回答
  • 2020-11-29 19:42

    I had the same problem and finally discovered that the real problem was the SERVER TIME. It was misconfigured and AWS responds with a 403 FORBIDDEN.

    Using Debian you can autoconfigure using NTP:

    ntpdate 0.pool.ntp.org

    0 讨论(0)
  • 2020-11-29 19:46

    This will also happen if your machine's time settings are incorrect

    0 讨论(0)
  • 2020-11-29 19:47

    Another solution avoiding custom policies and using AWS predefined policies:

    • Add S3 full access permissions to your S3 user.

      • IAM / Users / Permissions and Attach Policy
      • Add policy "AmazonS3FullAccess"
    0 讨论(0)
提交回复
热议问题