Magento 2 Allowed Memory Size Exhausted – AWS S3 Module Issue

awsmagento2memorymemory-limit

While Running cache:flush command I am Facing strange error like this,

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes) in public_html/vendor/magento/module-aws-s3/Driver/AwsS3Factory.php on line 46

even if Memory limit is set to -1 I am getting this error

Any solution ?

Best Answer

There is an issue with your AWS S3 Bucket storage. See this guide how to increase.

https://devdocs.magento.com/guides/v2.4/config-guide/remote-storage/config-remote-storage-aws-s3.html