- Newest
- Most votes
- Most comments
Yes, it is possible for multiple AWS Lightsail instances to share the same folder and files, but you'll need to implement a specific solution for this. When configuring Lightsail instances for load balancing or horizontal scaling, AWS recommends thinking about how to share the file system across instances.
There are several approaches you can consider:
-
Network File System (NFS): You can set up one instance as an NFS server and have other instances mount the shared directories.
-
Lightsail Block Storage: You can attach Lightsail block storage disks to your instances, though this typically works with one instance at a time.
-
Amazon S3 Storage: You can use Amazon S3 for shared file storage, which is particularly useful for static content and files that need to be accessed by multiple instances.
When implementing horizontal scaling with Lightsail, it's important to consider not just file sharing but also database configuration. AWS recommends creating a database on a separate instance that all your other instances can connect to, ensuring they store and retrieve information from the same place.
The specific approach you choose will depend on your application's requirements, including factors like read/write frequency, file sizes, and performance needs.
Sources
Configure Lightsail instances for load balancing - Amazon Lightsail
Unfortunately, AWS EFS uses NFSV4.1 and the Microsoft servers in Lightsail do not support NFSV4.1. We need file access and not http socket access and so Amazon S3 is not appropriate.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
