• Function

    resolveDirectHelloInput

    Resolves the name used by the directly invoked sample Lambda. Extracts and validates the name from the event, falling back to "world" if not provided or if the provided value is empty after trimming.

    Returns

    Normalized input with resolved name and source tracking

    Example

    // With provided name
    const input = resolveDirectHelloInput({ name: 'Bayu' });
    // { name: 'Bayu', source: 'event' }

    Example

    // Empty string falls back to default
    const input = resolveDirectHelloInput({ name: ' ' });
    // { name: 'world', source: 'default' }

    Example

    // Undefined/missing event falls back to default
    const input = resolveDirectHelloInput();
    // { name: 'world', source: 'default' }

    Author

    Bayu Dwiyan Satria

    Since

    1.0.0

    See

    directHelloHandler

    Parameters

    Returns DirectHelloInput

Generated using TypeDoc