Amplify Toolbox
    Preparing search index...

    Utility object for configuring storage access

    type StorageAccessBuilder = {
        authenticated: StorageActionBuilder;
        entity: (entityId: EntityId) => StorageActionBuilder;
        groups: (groupNames: string[]) => StorageActionBuilder;
        guest: StorageActionBuilder;
        resource: (
            other: ConstructFactory<
                ResourceProvider & ResourceAccessAcceptorFactory,
            >,
        ) => StorageActionBuilder;
    }
    Index

    Properties

    authenticated: StorageActionBuilder

    Configure storage access for authenticated users. Requires defineAuth in the backend definition.

    https://docs.amplify.aws/gen2/build-a-backend/storage/#authenticated-user-access

    When configuring access for paths with the {entity_id} token, the token is replaced with a wildcard (*). For a path like media/profile-pictures/{entity_id}/*, this means access is configured for authenticated users for any file within media/profile-pictures/*.

    entity: (entityId: EntityId) => StorageActionBuilder

    Configure owner-based access. Requires defineAuth in the backend definition.

    Type declaration

    groups: (groupNames: string[]) => StorageActionBuilder

    Configure storage access for User Pool groups. Requires defineAuth with groups config in the backend definition.

    Configure storage access for guest (unauthenticated) users. Requires defineAuth in the backend definition.

    https://docs.amplify.aws/gen2/build-a-backend/storage/#guest-user-access

    When configuring access for paths with the {entity_id} token, the token is replaced with a wildcard (*). For a path like media/profile-pictures/{entity_id}/*, this means access is configured for guest users for any file within media/profile-pictures/*.

    resource: (
        other: ConstructFactory<
            ResourceProvider & ResourceAccessAcceptorFactory,
        >,
    ) => StorageActionBuilder

    Grant other resources in the Amplify backend access to storage.

    Type declaration