Not necessarily. "Just" making it free software (eg slapping a GPL v2 on Elasticsearch) doesn't require AWS to share any changes to the codebase, and wouldn't have prevented the current AWS/Elastic drama as it wouldn't have prevented AWS from monetizing Elasticsearch.
Now AGPL might have, if it was used from the start... not because it would prevent any monitization, but because it might bring enough legal uncertainty for AWS to even consider using it
Now AGPL might have, if it was used from the start... not because it would prevent any monitization, but because it might bring enough legal uncertainty for AWS to even consider using it