The description for the defender magic sword mentions the following benefit (emphasis mine):
You gain a +3 bonus to attack and damage rolls made with this magic weapon.
The first time you attack with the sword on each of your turns, you can transfer some or all of the sword's bonus to your Armor Class, instead of using the bonus on any attacks that turn. For example, you could reduce the bonus to your attack and damage rolls to +1 and gain a +2 bonus to AC. The adjusted bonuses remain in effect until the start of your next turn, although you must hold the sword to gain a bonus to AC from it.
The description states that I can transfer a portion of the attack roll modifier to my AC "the first time I attack".
So if I'm a character that can make two attacks in 1 turn, does that mean I can choose to transfer a portion of the attack modifier just after my first attack? Or is it just before my first attack?
It sounds to me like I get the attack bonus for the first attack of my turn, and then if I want to do the transfer, I can activate it just after that first attack, but the transfer is not allowed any other time.