Skip to content

Commit b87b81a

Browse files
author
Frank Natividad
committed
Update README.md
1 parent 25462fd commit b87b81a

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

storage/s3-sdk/README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
1-
# Google Cloud Storage (GCS) and the Google Java API Client library
1+
# Using Google Cloud Storage (GCS) with the S3 SDK
22

3-
Google Cloud Storage Service features a REST-based API that allows developers to store and access arbitrarily-large objects. These sample Java applications demonstrate how to access the Google Cloud Storage JSON API using the Google Java API Client Libraries. For more information, read the [Google Cloud Storage JSON API Overview][1].
3+
[Google Cloud Storage][1] features APIs that allows developers to store and access arbitrarily-large
4+
objects. The [GCS XML API][5] provides support for AWS S3 API users that use S3 SDKs.
5+
Learn more about [Migrating to GCS][6].
46

5-
## Quickstart
7+
## Prerequisites
68

7-
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/), including the [gcloud tool](https://cloud.google.com/sdk/gcloud/).
9+
Install [Maven](http://maven.apache.org/).
810

9-
1. Setup the gcloud tool.
10-
11-
```
12-
gcloud init
13-
```
11+
## Setup
1412

1513
1. Clone this repo.
1614

1715
```
1816
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
1917
```
2018

21-
1. Install [Maven](http://maven.apache.org/).
19+
1. Change into this directory:
20+
21+
```
22+
cd java-docs-samples/storage/s3-sdk
23+
```
2224

2325
1. Build this project from this directory:
2426

2527
```
2628
mvn package
2729
```
2830

29-
1. Run one of the sample apps by specifying its class name and a bucket name:
31+
1. Get your [Interoperable Storage Access Keys][3] and set the following environment variables:
32+
33+
* AWS_ACCESS_KEY_ID=[ACCESS_KEY]
34+
* AWS_SECRET_ACCESS_KEY=[SECRET]
3035

31-
```
32-
mvn exec:java -Dexec.mainClass=StorageSample \
33-
-Dexec.args="ABucketName"
34-
```
3536

36-
Note that if it's been a while, you may need to login with gcloud.
37+
## List GCS buckets using the AWS S3 SDK
38+
39+
1. Run example using the following Maven command:
3740

3841
```
39-
gcloud auth application-default login
42+
mvn exec:java -Dexec.mainClass=S3Sdk
4043
```
4144

4245
## Products
4346
- [Google Cloud Storage][2]
4447

4548
## Language
46-
- [Java][3]
49+
- [Java][2]
4750

4851
## Dependencies
49-
- [Google APIs Client Library for Java][4]
50-
51-
[1]: https://cloud.google.com/storage/docs/json_api
52-
[2]: https://cloud.google.com/storage
53-
[3]: https://java.com
54-
[4]: http://code.google.com/p/google-api-java-client/
55-
52+
- [AWS S3 Java SDK][4]
53+
54+
[1]: https://cloud.google.com/storage
55+
[2]: https://java.com
56+
[3]: https://cloud.google.com/storage/docs/migrating#keys
57+
[4]: https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-s3
58+
[5]: https://cloud.google.com/storage/docs/xml-api/overview
59+
[6]: https://cloud.google.com/storage/docs/migrating

0 commit comments

Comments
 (0)