Yes, the problem is indeed caused by an upstream issue in the aws-sdk-sns gem. But it is important to realize that - since Discourse uses this gem and exposes the bug to the world - every Discourse instance is vulnerable even when it does not actually use the AWS SNS service.
So while it is not a “Discourse bug” it is a “security vulnerability in Discourse”.