Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Can we create a text file directly in storage buckets with commands like “vi”?

Can we create a text file directly in storage buckets with commands like "vi"?

2 Answers

No, you would need to upload the file to S3. With sync you can configure a process that will copy files from your local file system to S3 automatically at some specified interval. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/sync.html

Tuan LE

Although the same principal applied, but in this case tt’s GCS, not AWS S3 😉

You can’t do that unfortunately 🙂

vi or nano or other text editor is a regular application runs on top of an operating system, and such program interacts with storage device via an abstract layer provided by OS called "file system". In other words, regular applications can only read/write to file-based storage device (that provides NFS,ext3/4, xfs, etc.).

GCS is a block-based storage service, and you will need a special program to read/write data to it (in this case, the gsutil command).

destiny88

Thanks, Tuan LE, for answering my query. I appreciate your help.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?