SAN FRANCISCO — Amazon said this week that it would not let third-party retailers sell products that feature Nazi and white nationalist symbolism on its platform, amid pressure from nonprofit groups and lawmakers.

In a letter dated Tuesday to Representative Keith Ellison, a Democrat from Minnesota, Amazon said it had removed products that violated its policy against product listings that promote hatred, violence or discrimination.

“We have reviewed the products and content referenced in your letter, and removed the listings that were found in violation of our policies and permanently blocked the seller accounts that were in violation of Amazon policy,” Brian Huseman, Amazon’s vice president for public policy, wrote in the letter, which was earlier reported by BuzzFeed. “We are also reviewing the seller accounts for potential suspension.”

Amazon sent its letter after two nonprofit groups — the Partnership for Working Families and the Action Center on Race and the Economy — called attention last month to product listings on the e-commerce site that included an infant onesie with a burning-cross graphic and jewelry emblazoned with Nazi swastikas.