And 1 is much better. They wouldn't be swarming around the beach, unless it was surrounded with barbed wire and they were looking in!
I don't know why I specified barbed wire; that's just the image that came to me - maybe from South Africa under Apartheid.
is it ok to say
a lot of people were/was swarming along the beach
Again I would encourage you to get this sort of answer from the website. Just type "a lot of people was" and then "a lot of people were" (with brackekts), then you will see that there are a lot more returns for WERE, than for WAS. Which indicates that WERE is the choice. Website is not a very "clean" database, but it works in most cases.