Mock S3 service for local development

杨华杰
1 min readJun 9, 2022

Working in enterprise environment is complex, in one side you have rich resources, another side to access these resources is hard, sometimes impossible!!! You will encounter firewall/proxy/authentication barriers.

For my used case, I just want to test S3 service, simple function like upload/download/create bucket. I have three choices, docker/a real S3 service / local mock.

First one Docker with localstack

the problems:
- I can not connect to docker hub
- while I download localstack via a http proxy, enterprise scan find some vulnerabilities in some dependencies(long list)

this is option is out.

Second with S3Mock
the problems:
- vulnerabilities in it’s dependencies
- complex proxy setup to get those dependencies

The last one which works
A java lib dependency https://github.com/findify/s3mock , believe it or not, java dependencies is the most easier way to get in an enterprise network.

The code also simple.

<dependency>
<groupId>io.findify</groupId>
<artifactId>s3mock_2.13</artifactId>
<version>0.2.6</version>
<scope>test</scope>
</dependency>
<scope>test</scope></dependency>

--

--