Was getting wood with pteradon and didn't know one was sneaking up on me. Luckily I had my pteradon on aggressive when resource collecting, pteradon killed the titanboa but was knocked out so I sat there spamming stim berries to get him awake again.

Note: Have flying dinos with and have on aggressive when anywhere near swamp

More Titanoboa Encountering Tips