def resolve_bedrock_credentials(
    region_name: Optional[str] = None,
    aws_access_key_id: Optional[str] = None,
    aws_secret_access_key: Optional[str] = None,
) -> tuple[Optional[str], Optional[str], str]:
    """
    Resolve AWS Bedrock credentials.

    The order of precedence is:
    1. Explicitly passed credentials
    2. Environment variables
    3. Default region
    """
    region = get_from_param_or_env(
        "region_name", region_name, "AWS_REGION", DEFAULT_BEDROCK_REGION
    )
    access_key = get_from_param_or_env(
        "aws_access_key_id", aws_access_key_id, "AWS_ACCESS_KEY_ID", ""
    )
    secret_key = get_from_param_or_env(
        "aws_secret_access_key", aws_secret_access_key, "AWS_SECRET_ACCESS_KEY", ""
    )

    return access_key, secret_key, region

    Resolve AWS Bedrock credentials.

    The order of precedence is:
    1. Explicitly passed credentials
    2. Environment variables
    3. Default region
    
llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-bedrock/llama_index/multi_modal_llms/bedrock/utils.py