Skip to content

Magento 2 MAMP setup, how to connect with localstack docker

I have a Magento 2 installation on Mac(Sequoia) with MAMP(Apache). I have installed LocalStack on Docker(Colima) and it is working fine separately.
I am trying to connect my Magento with Localstack using the following command

bin/magento set:confi:set --remote-storage-driver="aws-s3" --remote-storage-bucket="local-bucket" --remote-storage-region="eu-central-1" --remote-storage-key="TestKey123" --remote-storage-secret="TestSec123" --remote-storage-endpoint="http://localhost:4566" --remote-storage-path-style=1 -n

Getting error Adapter error: Unable to write file at location: storage.flag.

I am getting the base idea that Magento is not able to connect with the localstack s3 storage. How can this connection be established ?