# Assistance Required with Recording Download

**URL:** <https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159>\
**Category:** Issues developing apps\
**Created:** [August 7, 2024, 9:45am UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159 "2024-08-07T09:45:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lily.menorah](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lily.menorah](https://openvidu.discourse.group/u/lily.menorah)\
**Post date:** [August 7, 2024, 9:45am UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/1 "2024-08-07T09:45:18Z")

</div>

**Description:**

I have deployed an OpenVidu single node server on-premises, which is running and accessible via `https://domain1.com`. I also deployed an application server to manage tokens, webhooks, and recordings on a different domain, `https://domain2.com`.

**Current Setup**

- **OpenVidu Server** :

- **Application Server** :

- **Webhooks** :

**Issue:**

I am trying to download recordings from the application server when the `egress_ended` event is triggered. However, I am encountering issues with accessing the recordings due to endpoint configuration problems.

**Endpoints in `env and logs`:**

- MinIO: `http://localhost:9000`
- S3: `http://localhost:9100`

These services are running on `domain1`, but I am attempting to download recordings from `domain2`.

**Problems Encountered:**

- **Access Denied** : I tried downloading directly from the S3 link, but I received an “Access Denied” error.
- **Endpoint Confusion** : I am unsure about the correct endpoint configuration for accessing the openvidu bucket using either MinIO or S3 SDK from `domain2`.

Could you please assist with downloading the recording?

Thank you in advance for your assistance.

---

<div class="post-metadata">

**Author:** ![lily.menorah](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lily.menorah](https://openvidu.discourse.group/u/lily.menorah)\
**Post date:** [August 8, 2024, 6:32am UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/2 "2024-08-08T06:32:27Z")

</div>

Running the application server on the same instance but on a different port is the only option or is there any other way to download the recording?

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [August 8, 2024, 8:20am UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/3 "2024-08-08T08:20:10Z")

</div>

I think you should need pre sign the url for having access to the file

> **[Create a presigned URL for Amazon S3 using an AWS SDK - Amazon Simple Storage...](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_PresignedUrl_section.html)**
>
> Create a presigned URL for Amazon S3 using an AWS SDK

---

<div class="post-metadata">

**Author:** ![lily.menorah](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lily.menorah](https://openvidu.discourse.group/u/lily.menorah)\
**Post date:** [August 8, 2024, 1:34pm UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/4 "2024-08-08T13:34:21Z")

</div>

I attempted to create a presigned URL for Amazon S3 but encountered the following errors:

**1. Initial Error:**

```auto
<Error>
<Code>AuthorizationQueryParametersError</Code>
<Message>Error parsing the X-Amz-Credential parameter; the region 'us-east-1' is wrong; expecting 'us-east-2'</Message>
<Region>us-east-2</Region>
<RequestId>4HEX3NRFADJDTFNX</RequestId>
<HostId>YAcnSZJidLs63I8MrFP2zY4XXWNzDwcu6jTy5DJc+Ask+TCwzNeIlP0Lypv/sXHqXoLt4rtk/a8=</HostId>
</Error>

```

Although the region was specified as `us-east-1` in Docker, I also tried `us-east-2`, but received the following error:

**2. Subsequent Error**

```auto
<Error>
<Code>InvalidAccessKeyId</Code>
<Message>The AWS Access Key Id you provided does not exist in our records.</Message>
<AWSAccessKeyId><MY_CALL_S3_ACCESS_KEY></AWSAccessKeyId>. //Access key mentioned in the .env
<RequestId>ASEY1G5AV2GSJ0X9</RequestId>
<HostId>oFwZQKVdPbes/+DwrIVoR2zPPQQGf8GOstD83iWyjKadOfPeUbpQw38DCnWUaLKvTjYqKtXWX88=</HostId>
</Error>

```

The actual URL to my file is:

> [https://openvidu.s3.amazonaws.com/recordings/pMIAhZY71gNInLGpL3ii/1723019617.ogg](https://openvidu.s3.amazonaws.com/recordings/pMIAhZY71gNInLGpL3ii/1723019617.ogg)

Any insights on fixing this would be appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 8, 2024, 1:41pm UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/5 "2024-08-08T13:41:46Z")

</div>

This URL will not work because it points to an S3 bucket in AWS rather than to your deployment.

You need to modify the URL to access the Minio instance deployed in OpenVidu.

If you want Minio to be publicly accessible, you need to open port 9000. Once the port is open, you can access your files via `https://<your-domain>:9000/`.

> - **Endpoint Confusion** : I am unsure about the correct endpoint configuration for accessing the OpenVidu bucket using either MinIO or the S3 SDK from `domain2`.

I understand the confusion. The egress service generates a URL pointing to S3, but this is not the actual Minio S3 URL. Currently, you need to determine the appropriate URL manually.

---

<div class="post-metadata">

**Author:** ![lily.menorah](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lily.menorah](https://openvidu.discourse.group/u/lily.menorah)\
**Post date:** [August 8, 2024, 1:53pm UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/6 "2024-08-08T13:53:15Z")

</div>

Thanks for responding.

Got it! I have one more follow-up question.

> If I run the application server on the same instance but on a different port, I’ll be able to download the file directly from localhost, right?

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 8, 2024, 2:20pm UTC](https://openvidu.discourse.group/t/assistance-required-with-recording-download/5159/7 "2024-08-08T14:20:05Z")

</div>

> If I run the application server on the same instance but on a different port, I’ll be able to download the file directly from localhost, right?

If your application server is running on the same machine as Minio, and it can access [http://localhost:9000](http://localhost:9000), it should work without any issues.
