def METHOD_NAME():
    source_control = SourceControl.get_source_control()
    try:
        source_control_setup = source_control.is_setup()
    except CommandError:
        source_control_setup = False
    if not source_control_setup:
        io.log_error("Cannot setup CodeCommit because there is no Source Control setup")
        return
    if codecommit.region_supported():
        codecommit_setup = print_current_codecommit_settings()
        if codecommit_setup:
            should_continue = io.get_boolean_response(
                text='Do you wish to continue?',
                default=True)
            if not should_continue:
                return
        source_control.setup_codecommit_cred_config()
        from ebcli.controllers import initialize
        repository = initialize.get_repository_interactive()
        branch = initialize.get_branch_interactive(repository)
        set_repo_default_for_current_environment(repository)
        set_branch_default_for_current_environment(branch)
    else:
        io.log_error("The region {0} is not supported by CodeCommit".format(aws.get_region_name()))