Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to see files stored in localstack's mocked S3 environment

I've setup a localstack install based off the article How to fake AWS locally with LocalStack. I've tested copying a file up to the mocked S3 service and it works great.

I started looking for the test file I uploaded. I see there's an encoded version of the file I uploaded inside .localstack/data/s3_api_calls.json, but I can't find it anywhere else.

Given: DATA_DIR=/tmp/localstack/data I was expecting to find it there, but it's not.

It's not critical that I have access to it directly on the file system, but it would be nice.

My question is: Is there anywhere/way to see files that are uploaded to the localstack's mock S3 service?

like image 911
Alan W. Smith Avatar asked Jul 11 '19 19:07

Alan W. Smith


People also ask

How do I view LocalStack?

Hit up http://localhost:8080 to see the console. LocalStack AWS CLI is a thin wrapper around the aws command line. This will save you remembering port numbers and typing the endpoint-url all the time. Do check it out!

How do I view files in S3 bucket?

In AWS Explorer, expand the Amazon S3 node, and double-click a bucket or open the context (right-click) menu for the bucket and choose Browse. In the Browse view of your bucket, choose Upload File or Upload Folder. In the File-Open dialog box, navigate to the files to upload, choose them, and then choose Open.

Where are my files on AWS S3?

You can use the aws s3 ls command to list all the buckets in a region. Objects – An object is a file or folder stored in an S3 bucket. Objects are stored in folders, and folders can contain other folders and files. To get information about an object, you can use the aws s3 ls command.


2 Answers

I went back and re-read the original article which states:

"Once we start uploading, we won't see new files appear in this directory. Instead, our uploads will be recorded in this file (s3_api_calls.json) as raw data."

So, it appears there isn't a direct way to see the files.

However, the Commandeer app provides a view into localstack that includes a directory listing of the mocked S3 buckets. There isn't currently a way to see the contents of the files, but the directory structure is enough for what I'm doing. UPDATE: According to @WallMobile it's now possible to see the contents of files too.

Commandeer localstack S3 View

like image 126
Alan W. Smith Avatar answered Sep 16 '22 19:09

Alan W. Smith


After the latest update, now we have only one port which is 4566.

Yes, you can see your file. Open http://localhost:4566/your-funny-backet-name/you-weird-file-name in chrome.

You should be able to see the content of your file now.

like image 32
Debu Shinobi Avatar answered Sep 17 '22 19:09

Debu Shinobi