A lightweight, LGPL-2.1 licensed C API to read from / write to S3 buckets
Find a file
2025-06-18 14:45:43 +04:00
.github/workflows Update scanbuild.yml add gawk 2025-06-18 14:45:43 +04:00
ci-scripts Code cleanups 2019-05-21 14:38:05 +01:00
debian Add RPM and DEB package building 2019-03-25 13:36:26 +00:00
docs Fix version history (#135) 2024-09-27 10:39:37 +01:00
extra Move error codes to public API 2019-03-26 08:13:42 +00:00
libmarias3 Add Content-Type support for object mime 2024-09-10 15:19:06 +03:00
m4 detect libcurl linked openssl version a run time 2020-05-03 17:40:04 +02:00
rpm Add new XML parser and fix bugs 2020-04-20 19:49:52 +01:00
src add curl verbose option 2025-06-18 14:45:43 +04:00
tests Fix ms3_get_content_type() (#128) 2024-09-27 10:23:30 +01:00
yatl Fix warnings and add force protocol option 2019-05-31 15:22:51 +01:00
.gitignore Added TAGS to .gitignore 2024-09-10 21:50:12 +03:00
.readthedocs.yaml Fix rtd (#134) 2024-09-27 10:16:59 +01:00
configure.ac Allow for disabling content type 2024-09-10 15:18:57 +03:00
GNUmakefile First version dump 2019-03-22 08:00:38 +00:00
libmarias3.pc.in Cleanup linking 2019-03-28 17:54:35 +00:00
LICENSE First version dump 2019-03-22 08:00:38 +00:00
Makefile.am MDEV-25716 Building failure in S3 engine on MacOS 2021-06-14 22:22:25 +03:00
README.rst Update README.rst 2024-09-27 10:23:12 +01:00
version.h.in First version dump 2019-03-22 08:00:38 +00:00
VERSION.txt Update VERSION.txt 2024-09-27 10:24:49 +01:00

libMariaS3
==========

.. image:: https://readthedocs.org/projects/libmarias3/badge/?version=latest
   :target: https://libmarias3.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

This is a lightweight C library to read/write to AWS S3 buckets using objects in memory.

You will need an access key which for AWS can be created at `the AWS security crenditials page <https://console.aws.amazon.com/iam/home?#/security_credentials>`_.

Compiling
---------

.. code-block:: bash

   autoreconf -fi
   ./configure
   make

Testing
-------

libMariaS3 comes with a basic test suite which we recommend executing, especially if you are building for a new platform.

You will need the following OS environment variables set to run the tests:

+------------+----------------------------------------------------------+
| Variable   | Desription                                               |
+============+==========================================================+
| S3KEY      | Your AWS access key                                      |
+------------+----------------------------------------------------------+
| S3SECRET   | Your AWS secret key                                      |
+------------+----------------------------------------------------------+
| S3REGION   | The AWS region (for example us-east-1)                   |
+------------+----------------------------------------------------------+
| S3BUCKET   | The S3 bucket name                                       |
+------------+----------------------------------------------------------+
| S3HOST     | OPTIONAL hostname for non-AWS S3 service                 |
+------------+----------------------------------------------------------+
| S3PORT     | OPTIONAL port for non-AWS S3 service                     |
+------------+----------------------------------------------------------+
| S3USEHTTP  | Set to ``1`` if the host uses http instead of https      |
+------------+----------------------------------------------------------+
| S3NOVERIFY | Set to ``1`` if the host should not use SSL verification |
+------------+----------------------------------------------------------+

If you have minion installed, you should be able to use same settings as used by
MariaDB mtr s3 tests:

.. code-block:: bash

   export S3KEY=minio
   export S3SECRET=minioadmin
   export S3REGION=
   export S3BUCKET=storage-engine
   export S3HOST=127.0.0.1
   export S3PORT=9000
   export S3USEHTTP=1

The test suite is automatically built along with the library and can be executed with ``make check`` or ``make distcheck``.

Before pushing, please ALWAYS ensure that ``make check`` and ``make distcheck`` works!


Credits
-------

The libMariaS3 authors are:

* `Andrew (LinuxJedi) Hutchings <mailto:andrew@linuxjedi.co.uk>`_
  - Starting with this commit, all my contributions are under the 3-clause BSD license.
* `Sergei Golubchik <mailto:sergei@mariadb.com>`_
* `Markus Mäkelä <markus.makela@mariadb.com>`_

libMariaS3 uses the following Open Source projects:

* `libcurl <https://curl.haxx.se/>`_
* `xml.c <https://github.com/ooxi/xml.c/>`_
* `DDM4 <https://github.com/TangentOrg/ddm4>`_
* `Jouni Malinen's SHA256 hash code <j@w1.fi>`_