AWS S3 Bucket Drive Mapping

If you or your company use an old NAS box, you might be tempted to move it into the cloud and keep the way in which its acceessed by users. When working with NAS boxes people are used to saving documents to network drives, so things like the Y drive are comfortable and familier. But if you move data into the cloud, how can you retain those access methods?

This blog provides an example of moving your NAS into AWS, there is however one issue I couldnt resolve. When copying or moving the network file shares to the S3 bucket, the files lost the creation and last modified dates. Bit of a dealbreaker I think, but maybe you can find a fix?

Bucket Configuration

Setup a storage bucket called “Cloud_NAS” with no public access, and a folder structure like:

team1
team2
team3

Create policies restricting access to appropriate folders inside the bucket, then create user groups in IAM with correct policy assigned. Finally create users (use access keys and record these as you’ll need them when installing the client software) as required and assign to groups.

Sample access policy (this one should be assigned to users in team1, you can create two more access policies for the other teams):

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowUserToSeeBucketListInTheConsole",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListAllMyBuckets"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::Cloud_NAS.myaws"
            ],
            "Condition": {
                "StringLike": {
                    "s3:prefix": [
                        "",
                        "team1/*"
                    ],
                    "s3:delimiter": [
                        "/"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::Cloud_NAS.myaws"
            ],
            "Condition": {
                "StringLike": {
                    "s3:prefix": [
                        "/team1/*"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:*Object"
            ],
            "Resource": [
                "arn:aws:s3:::Cloud_NAS.myaws/accounts/*"
            ]
        }
    ]
}

Client Software

Windows cannot natively access S3 storage, so we use something like tntDrive or S3 Drive.

Install your client software, you will need the to provide the REST endpoint (Cloud.NAS.myaws in my example), the users access key and secret key.

https://tntdrive.com/

https://tntdrive.com/