I’m a bridesmaid on a serious budget

Hello… I am supposed to be a bridesmaid in a destination Indian wedding coming up soon. The issue is that the wedding is 4 days long and when I calculated all of the costs including airfare, hotel accommodations, and the gamut of expenses that come along with that I’ve come up to around $5k on the low end. I have already accepted the bridesmaid request (which is a few months out) but didn’t realize at the time all of the expenses I was going to incur. What is a polite way to tell my friend that I simply cannot afford to be her bridesmaid, or even attend for that matter to be honest. :( I feel bad