Public IPv4 addressing behavior with AWS spot instances

I'm deploying a very resource intensive web scraper, to optimize costs I opted to use AWS Spot Instances knowing the default behavior of IP addresses when dealing with EC2 instances the 1st question that came up to mind was if it's possible to maintain a fixed IP address when spots are reissued by AWS.

it is crucial to be able to do this without any human intervention (the whole thing is connected to multiple gitlab pipelines)


Put them behind a NAT gateway - that way they’ll extenally use the NAT GW IP address.