S3 return 403 error when generating Whatsapp Image Preview Links (opengraph tag)

0

Our website uses S3 for media hosting (only images), with its own url (midia.xxxxxx.com.br) and certificate in "flexible" mode, mediated by Cloudflare (which acts as a primary DNS and proxy, we do not put our certificate on S3 because we use let's encrypt at source). Everything works fine, except for one detail: when we try to share a link in the Whatsapp application, the images offered by the opengraph tag cannot be embedded in the post. Whatsapp receives a 503 code. This does not happen with any other social network. For the rest, everything is ok.

Access to the bucket is completely public and the images can be opened normally in any browser. Browsing is properly guided by ssl (albeit forcedly, by Cloudflare), and everything else in media management and loading works fine... Does anyone have any idea how to solve this?

Jeff
asked 2 years ago959 views
1 Answer
0

Hello Jeff,

Thank you for your question.

The issue you are experiencing is a 403 error with the images when sharing your website image link in WhatsApp. The 403 Forbidden error can be resolved by opening the IAM console and checking the permissions to ensure permissions are granted for the s3:PutObject or s3:PutObjectAcl on the bucket.

Since the other social media platforms are working with the S3 object, this appears to be a server-side configuration error with WhatsApp. Restart your device, refresh the application, and check if other users are experiencing similar problems with WhatsApp.

Documentation:
https://aws.amazon.com/premiumsupport/knowledge-center/s3-403-forbidden-error/
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions