⚠️ This adapter is deprecated and will no longer receive updates. If you're looking for an S3 adapter, then consider using the hyper Storage MinIO Adapter which is up to date, and more flexible and configurable.
A Storage port adapter that uses AWS S3 for object storage in the hyper service framework
hyper.config.js
import { default as s3 } from "https://x.nest.land/[email protected]/mod.js";
export default {
app: opine,
adapter: [
{ port: "storage", plugins: [s3("UNIQUE_NAME")] },
],
};
When you configure the hyper service with this adapter, you must provide a unique bucket prefix. This helps ensure your bucket name is globally unique
The unique name is an alphanumeric string that contains identifing information, this will enable you to identify the bucket which will be prefixed by 'hyper-storage-' and whatever name you provide.
In order to use this adapter you will need to have an AWS Account and will need the following information:
- IAM User with access to s3 (AWS_ACCESS_KEY_ID, AWS_ACCESS_SECRET_KEY)
- AWS Region (default: us-east-1)
The AWS User will need the ability to manage s3 and s3 resources
This adapter will attempt to read AWS_ACCESS_KEY_ID
and
AWS_ACCESS_SECRET_KEY
from Deno.env
. Alternatively, you can provide the
access key, secret key, and region as arguments to the adapter factory function:
import { default as s3 } from "https://x.nest.land/[email protected]/mod.js";
export default {
app: opine,
adapter: [
{
port: "storage",
plugins: [
s3("UNIQUE_NAME", {
awsAccessKeyId: "foo",
awsSecretKey: "bar",
awsRegion: "us-east-1", // defaults to 'us-east-1`
}),
],
},
],
};
You may set envrionment variables like so, and the adapter will use them:
AWS_ACCESS_KEY_ID=XXXXX
AWS_SECRET_ACCESS_KEY=XXXX
AWS_REGION=XXXXX
This is a Deno module available to import from nest.land
deps.js
export { default as s3 } from "https://x.nest.land/[email protected]/mod.js";
- Create an
s3
bucket - Remove an
s3
bucket - List
s3
buckets - Put an object into an
s3
bucket - Remove an object from an
s3
bucket - Get an object from an
s3
bucket - List objects in an
s3
bucket
This adapter fully implements the Search port and can be used as the hyper Storage service adapter
See the full port here
Contributions are welcome! See the hyper contribution guide
./scripts/test.sh
To lint, check formatting, and run unit tests
Apache-2.0