Fortunately, EC2 allows you to request static addresses that are associated with your account. Each address can be assigned to a single virtual system, and will replace it's dynamically assigned address.
This page lists all static IP addresses owned by your EC2 accounts, and allows you to request a new one. Requesting an address is free, but there are hourly charges for unassigned addresses and for transferring IPs between EC2 instances.