# GCP and S3 API Interoperability

Google Cloud Storage offers interoperability support with Amazon's S3 API, allowing you to continue using the same S3 client libraries. To run an application designed to use the S3 storage API on Google Cloud Platform (GCP) without changing the application's storage interface, use the **Storage Transfer Service** for migration and then use **Google Cloud Storage** as your storage solution with a compatibility layer.

To configure your S3 application to use GCP, assuming GCP is currently configured to interact with S3, follow these steps:

1. Set up a Google Cloud Storage bucket:
   1. Create a Google Cloud account, and set up a Google Cloud project.
   2. Create a bucket in Google Cloud Storage:
      1. Go to the Google Cloud Console.
      2. Navigate to **Storage --> Browser** and click on **Create bucket**.
      3. Configure the bucket settings according to your needs, similar to how your AWS S3 bucket is configured.
2. Configure Google Cloud Storage to handle S3 API requests:

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Google Cloud Storage has built-in support to handle S3 API requests. You will need to make some adjustments to your configuration.</p></div>

   1. Activate the S3 compatible API in your Google Cloud project:
      1. Go to the Google Cloud Console.
      2. Navigate to **Settings** under **Storage** and enable **Interoperability**.
      3. If you have not set up interoperability before, you might need to create a new interoperability access key.
   2. Use the genenerated access keys (access key ID and secret access key) in your existing application configuration where you previously used AWS credentials.
3. Update the endpoint configuration:

   Modify your application's S3 API endpoint configuration to point to Google's Cloud Storage S3 endpoint. This typically involves changing the endpoint URL from <https://s3.amazonaws.com> to <https://storage.googleapis.com>.
4. Data migration:

   To migrate your data from AWS S3 to Google Cloud Storage:

   1. Use Google's Storage Transfer Service:
      1. Navigate to the **Storage** section in the Google Cloud Console.
      2. Click on **Transfer** and create a transfer job from Amazon S3 to Google Cloud Storage.
      3. Provide the necessary credentials and configure the data transfer settings according to your requirements.
   2. Verify the data integrity after the transfer to ensure that all data is accurately copied over.
5. Testing:
   1. Test the application to ensure that it functions correctly with the Google Cloud Storage backend using the S3 API.
   2. Look for any compatibility issues with the API calls and any performance discrepancies that might need addressing.
6. Monitor and optimize:
   1. After migration, monitor your application for any performance issues or errors.
   2. Optimize configurations (like changing the class storage or lifecycle policies) as needed based on application usage patterns.

By following these steps, you can effectively run your application on GCP using Google Cloud Storage, with minimal changes to the way your application interfaces with S3. This approach leverages GCP's ability to mimic S3 APIs, providing a smoother transition without extensive code modifications.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aizen-corp.gitbook.io/docs/installation/setting-up-your-environment/deploying-kubernetes-on-gcp/gcp-and-s3-api-interoperability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
