# using npm
npm install @meaning-tech/provider-upload-aws-s3 --save
provider
defines the name of the providerproviderOptions
is passed down during the construction of the provider. (ex:new AWS.S3(config)
). Complete list of optionsactionOptions
is passed directly to the parameters to each method respectively. You can find the complete list of upload/ uploadStream options and delete options
See the documentation about using a provider for information on installing and using a provider. To understand how environment variables are used in Strapi, please refer to the documentation about environment variables.
./config/plugins.js
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: '@meaning-tech/provider-upload-aws-s3',
providerOptions: {
accessKeyId: env('AWS_ACCESS_KEY_ID'),
secretAccessKey: env('AWS_ACCESS_SECRET'),
region: env('AWS_REGION'),
params: {
Bucket: env('AWS_BUCKET'),
},
cdn: env('AWS_ENDPOINT'),
},
actionOptions: {
upload: {},
uploadStream: {},
delete: {},
},
},
},
// ...
});
These are the minimum amount of permissions needed for this provider to work.
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject",
"s3:PutObjectAcl"
],