You can not give your custody to your parents if your ex objects. However, since you will be out of the country a court would consider allowing your parents some form of visitation with the child so long as they already have a relationship with the grandchild.
Here's the Alabama statute governing grandparents' rights to spend time with their grandchildren, Ala. Code §30-3-4.1, amended effective September 1, 2003:
(a) For the purposes of this section, the term grandparent means the parent of a parent of a minor child, the parent of a minor child's parent who has died, or the parent of a minor child's parent whose parental rights have been terminated when the child has been adopted pursuant to Section 26-10A-27, 26-10A-28, or 26-10A-30, dealing with stepparent and relative adoption.
(b) Except as otherwise provided in this section, any grandparent may file an original action for visitation rights to a minor child if it is in the best interest of the minor child and one of the following conditions exist:
(1) When one or both parents of the child are deceased.
(2) When the marriage of the parents of the child has been dissolved.
(3) When a parent of the child has abandoned the minor.
(4) When the child was born out of wedlock.
(5) When the child is living with both biological parents, who are still married to each other, whether or not there is a broken relationship between either or both parents of the minor and the grandparent and either or both parents have used their parental authority to prohibit a relationship between the child and the grandparent.
(c) Any grandparent may intervene in and seek to obtain visitation rights in any action when any court in this state has before it any question concerning the custody of a minor child, a divorce proceeding of the parents or a parent of the minor child, or a termination of the parental rights proceeding of either parent of the minor child, provided the termination of parental rights is for the purpose of adoption pursuant to Sections 26-10A-27, 26-10A-28, or 26-10A-30, dealing with stepparent or relative adoption.
(d) Upon the filing of an original action or upon intervention in an existing proceeding pursuant to subsections (b) and (c), the court shall determine if visitation by the grandparent is in the best interests of the child. Visitation shall not be granted if the visitation would endanger the physical health of the child or impair the emotional development of the child. In determining the best interest of the child, the court shall consider the following:
(1) The willingness of the grandparent or grandparents to encourage a close relationship between the child and the parent or parents.
(2) The preference of the child, if the child is determined to be of sufficient maturity to express a preference.
(3) The mental and physical health of the child.
(4) The mental and physical health of the grandparent or grandparents.
(5) Evidence of domestic violence inflicted by one parent upon the other parent or the child. If the court determines that evidence of domestic violence exists, visitation provisions shall be made in a manner protecting the child or children, parents, or grandparents from further abuse.
(6) Other relevant factors in the particular circumstances, including the wishes of any parent who is living.
(e) The court shall make specific written findings of fact in support of its rulings. An original action requesting visitation rights shall not be filed by any grandparent more than once during any two-year period and shall not be filed during any year in which another custody action has been filed concerning the child. After visitation rights have been granted to any grandparent, the legal custodian, guardian, or parent of the child may petition the court for revocation or amendment of the visitation rights, for good cause shown, which the court, in its discretion, may grant or deny. Unless evidence of abuse is alleged or other exceptional circumstances, a petition shall not be filed more than once in any two-year period.
(f) If the court finds that the grandparent or grandparents can bear the cost without unreasonable financial hardship, the court, at the sole expense of the petitioning grandparent or grandparents, may appoint a guardian ad litem for the minor child.
(g) Notwithstanding the foregoing, a grandparent may not be granted visitation with a grandchild where the parent related to the grandparent has either given up legal custody voluntarily or by court order or has abandoned the child financially unless the grandparent has an established relationship with the child and the court finds that visitation with the grandparent is in the best interest of the child.