Amplify Toolbox
    Preparing search index...
    type AmplifyStorageProps = {
        isDefault?: boolean;
        name: string;
        outputStorageStrategy?: BackendOutputStorageStrategy<StorageOutput>;
        triggers?: Partial<
            Record<
                AmplifyStorageTriggerEvent,
                ConstructFactory<ResourceProvider<FunctionResources>>,
            >,
        >;
        versioned?: boolean;
    }
    Index

    Properties

    isDefault?: boolean

    Whether this storage resource is the default storage resource for the backend. required and relevant only if there are multiple storage resources defined.

    false.
    
    name: string

    Friendly name that will be used to derive the S3 Bucket name

    triggers?: Partial<
        Record<
            AmplifyStorageTriggerEvent,
            ConstructFactory<ResourceProvider<FunctionResources>>,
        >,
    >

    S3 event trigger configuration

    import { triggerHandler } from '../functions/trigger-handler/resource.ts'

    export const storage = defineStorage({
    triggers: {
    onUpload: triggerHandler
    }
    })
    versioned?: boolean

    Whether to enable S3 object versioning on the bucket.