How to use AWS SDK for JavaScript with Stook?

Integrate Medianova Stook Object Storage into your JavaScript applications using the AWS SDK.

You can use the AWS SDK for JavaScriptarrow-up-right to connect your applications to Medianova Stook Object Storage. With the SDK, you can set credentials, create buckets, and upload files directly to Stook.


Prerequisites

  • Node.js installed on your system

  • AWS SDK for JavaScript installed

  • Medianova Stook credentials:

    • Access Key

    • Secret Key

    • Endpoint


Installation

Install the AWS SDK for JavaScript:

npm install aws-sdk

Example: Create Bucket and Upload File

sample.js


Config.json Example

You can configure credentials in config.json or under ~/.aws/credentials.

config.json:


Running the Script

If credentials are saved under ~/.aws/credentials with profile medianova:

Expected output:


Troubleshooting / FAQ

  • Error: Credentials not found

    • Solution: Ensure config.json or ~/.aws/credentials contains valid keys.

  • Error: Bucket already exists

    • Solution: Use a unique bucket name.

  • Error: Connection issues

    • Solution: Verify endpoint URL and network connectivity.


References

Last updated

Was this helpful?