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 JavaScript 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-sdkExample: 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.jsonor~/.aws/credentialscontains 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?