I'm seeing similar behavior with a cloud-init process when I am assigning an elastic IP as part of the metadata for launching an instance.
The strange thing is I'm only seeing sporadic timeouts one and off for about 30 seconds while cloud-init is running. I'm testing this with a netcat that runs every 2 seconds as part of the cloud-init. I'm getting nc timeouts every few times for a while, and then it stabilizes. DNS seems to work every time and occasionally gives me a different IP (as expected).
I'm suspecting something to with the elastic IP assignment in the AWS infrastructure but I'm not sure.
The other interesting piece is that http connections to a local repo in my AWS account work fine, and calls to security.ubuntu.com (external to AWS I believe) work fine too. I've only been able to collect about 15 samples so far. I do have confirmation that when a netcat fails to archive.ubuntu.com, it succeeds elsewhere
ex from my script in cloud-init:
us-east-1.ec2.archive.ubuntu.com is an alias for us-east-1.ec2.archive.ubuntu.com.s3.amazonaws.com.
us-east-1.ec2.archive.ubuntu.com.s3.amazonaws.com is an alias for s3-1-w.amazonaws.com.
s3-1-w.amazonaws.com has address 205.251.242.197
nc: connect to us-east-1.ec2.archive.ubuntu.com port 80 (tcp) timed out: Operation now in progress
Connection to {myawsserver}.ec2.{somedomain} 80 port [tcp/http] succeeded!
Connection to security.ubuntu.com 80 port [tcp/http] succeeded!