How to Configure Amazon S3 to Allow Uploads of Only Specific File Types (Extensions)

Tadashi Shigeoka ·  Tue, August 10, 2021

I’ll introduce how to configure Amazon S3 to allow uploads of only specific file types (extensions).

AWS

Background: Want to Upload Only Specific File Types (Extensions) to S3

I wanted to upload only specific file types (extensions) to S3, so I verified the content of the following article.

? Amazon Support: Amazon S3 バケットのアップロードを特定のファイルタイプに制限する

Side Note: HTML Files with .png Extension Can Be Uploaded

The expected behavior was “uploading should not be possible if an HTML file has a .png extension,” but the verification result was “uploading itself is possible if you disguise the extension as .png.”

That’s all from the Gemba.