Article
Is S3 POSIX compliant?
•
read
What Is POSIX Compliance?
To explain POSIX compliance, we have to go back in time to why it was created. POSIX, which stands for Portable Operating System Interface, was defined in 1988 as a standard for interacting with operating systems.
Before POSIX or operating systems were a thing, all computer programs were written in machine code for the computer architecture they were designed for. As more computers and computer architectures came out, this became unmaintainable, as rewriting every program each time the architecture changed is beyond tedious.
That’s why Operating Systems like UNIX became so popular; they abstracted the computer architecture for developers, so software became portable between devices as long as they had a consistent OS. However, due to UNIX becoming open source, many derivatives of UNIX became popularized. These derivatives were once again not able to share software because the operating systems deviated from each other due to changes in the interface. You could no longer take the source code from one program and recompile it on another OS.
POSIX was born out of the idea that if all of these OSes had a common interface, then programs would be portable again. In 1988, the POSIX standard was created, and nowadays a lot of modern operating systems are POSIX-compliant or use it strongly as a guide like Linux and MacOS.
Commands like cd , mkdir , ls , and many more are POSIX compliant along with system calls like fork(). There are major OSes that are not POSIX-compliant, like Windows, which maintains its own standard. Overall, POSIX now makes it easier for developers to work with the OS, as they do not need to read a new manual for interfacing if the OS is POSIX-compliant.
POSIX and Storage
POSIX has a standard for file systems and how to interact with them. For example, POSIX requires mechanisms for locking, standardized file permissions, and ownership models to ensure consistent security across systems, mandates specific error codes and handling for file operations, and specifies atomic operations for file manipulations, among other things.
As a lot of POSIX compliant storage is migrated to cloud storage a common concern is will my application still work as intended with the new interface. A very common storage solution in modern day is object storage, specifically S3. Developers like S3 because it offers low latency, high scalability, redundancy, and high throughput. But there are concerns that come along with it. Also, is it easy to lift your POSIX-compliant file storage into S3?
Is S3 POSIX Compliant?
No, most definitely not, and it does not try to be. S3 is object storage that has an interface that is entirely different from POSIX. Developers might get confused since the AWS SDK looks POSIX-like with commands like aws s3 cp , but this does not mean S3 supports every command.
POSIX is just an interface, so could you just change the interface with S3 to match POSIX? Also no. Even if the S3 interface was changed to POSIX, S3 does not support a lot of features that POSIX requires. Some, but not all, are below:
- No Random Writes- Objects must be overwritten completely to be updated
- No Atomic Renaming- You need to delete and rewrite objects to rename them
- No Locking Mechanism- S3 has Object Lock, which is not a true lock like in POSIX
- No Symbolic Links- POSIX supports this, but S3 does not
While S3 falls short of full POSIX compliance, it does support some POSIX-like functionality:
- Hierarchical Namespace (via prefixes) - While S3 uses a flat key-value structure, key prefixes with
/delimiters simulate a directory hierarchy that can be listed and navigated similarly to POSIX directories - Read Operations - S3 supports sequential and range-based reads of objects, similar to POSIX
read()system calls, allowing applications to retrieve entire objects or specific byte ranges - Metadata Storage - S3 allows custom metadata to be attached to objects, which can partially emulate POSIX file attributes
- Error Handling - S3 provides consistent error codes and responses (like 404 for not found, 403 for access denied) that can be mapped to POSIX error codes like ENOENT and EACCES
People have tried to make S3 POSIX-compliant, but always at the cost of significant drawbacks. s3fs and goofyfs both try to help you interact with S3 as if it were a mounted file system. However, these are only at the interface level, and sometimes, behind the scenes, there are multiple API calls happening. Due to chaining API calls and resiliency issues, these libraries are not considered production-ready. Even if you fake the interface, the semantics do not line up.
Is POSIX Still Relevant?
Yes, POSIX is still extremely relevant, mainly because even if a system isn’t POSIX-compliant, somewhere in its stack is a system that is. In the words of Linux founder Linus Torvalds, “I like boring, and boring to me is no super exciting new features that will break machines for millions of people around the world”. A lot of software still uses POSIX, and even if a new cloud storage isn’t POSIX-compliant, it’s almost guaranteed that somewhere in its dependency stack is a program that relies on it.
What are Some POSIX Compliant Alternatives?
There are a load of file storage alternatives to S3 that are POSIX-compliant or POSIX-like. All of them support POSIX to make it easier to migrate local servers to the cloud. The options are below:
AWS Elastic File System (EFS)
EFS is a fully managed, elastic, POSIX-compliant file system designed for use with AWS cloud services and on-premises resources. It automatically grows and shrinks as you add and remove files, and supports the full POSIX file system semantics, including file locking, strong consistency, and atomic operations. EFS is ideal for applications that require shared file storage with POSIX compliance.
Ceph
An open-source, distributed storage system that provides object, block, and file storage in a unified system. CephFS, the file system component, is fully POSIX-compliant and can scale to exabyte levels. Ceph is popular for building private clouds and can be deployed on-premises or in cloud environments.
Google Cloud Filestore
Google's managed file storage service provides a POSIX-compliant interface with NFSv3 protocol support. It offers high throughput and IOPS performance suitable for enterprise applications, with the convenience of a fully managed service.
Archil
Archil provides infinite, shareable cloud volumes that are fully POSIX-compliant while integrating seamlessly with S3 by operating as a cache for S3. Archil automatically manages data tiering, offloading unused data to S3 while keeping active data in high-performance storage, resulting in storage savings. The platform scales infinitely without capacity planning, supports all POSIX operations (including renames, linking, and locking) even on S3-backed data.
Conclusion
The question “Is S3 POSIX compliant?” has a clear answer—no. S3 prioritizes scalability, durability, cost, and latency over POSIX semantics. For developers migrating from local POSIX-compliant storage to the cloud, there are still a lot of solutions out there. The common paradigm now is to use POSIX-compliant volumes for active computation and S3 for durable, cost-effective persistence. If you are trying to seamlessly get the value of both, check out Archil, which is trying to combine both into a fast, low-cost storage.
Authors
