A top Amazon executive privately advised the Trump administration on the launch of a new internet portal that is expected to generate billions of dollars for the technology company and give it a dominant role in how the US government buys everything from paper clips to office chairs.

Emails seen by the Guardian show that the Amazon executive Anne Rung communicated with a top official at the General Services Administration (GSA) about the approach the government would take to create the new portal, even before the legislation that created it – known to its critics as the “Amazon amendment” – was signed into law late last year.

Amazon and the Trump administration appear to have an antagonistic relationship because of the president’s frequent Twitter attacks on the Amazon founder, Jeff Bezos, who also owns the Washington Post. But the behind-the-scenes lobbying by Amazon officials underscores how the company has quietly amassed an unrivalled position of power with the federal government.

The 2017 correspondence between Rung – a former official in the Obama administration credited with transforming the federal government’s procurement policies before she joined Amazon – and Mary Davie at the GSA, offers new insights into how Amazon has used key former government officials it now employs – directly and as consultants – to gain influence and potentially shape lucrative government contracts.

It has not yet been determined which companies will build the US government’s new e-commerce portal, but Amazon is widely expected to take on a dominant role, giving it a major foothold in the $53bn market for federal procurement of commercial products.

Amazon is also the frontrunner to win a separate $10bn cloud computing contract with the Pentagon, known as Jedi, which will in effect move the defense department’s data on to a commercially run cloud computing system.

Amazon already operates a cloud service for the US intelligence community, including a contract with the CIA, and has said it can protect even the most top secret data on a cloud that is walled off from the public internet.

The company’s strength in its defense and intelligence business had largely been attributed to its hiring in 2011 of Steven Spano, a former brigadier general in the air force who has since left the company.

Last year, Amazon also won a contract worth up to $5.5bn that made it the chief supplier of goods, including stationery and books, to tens of thousands of local governments and municipalities across the US.

The spate of contracts, said Stacy Mitchell, co-director of the Institute for Local Self-Reliance, a group that supports local businesses, reflected Amazon’s ambitions across the federal government, as well as state and local government.

Amazon declined to comment on questions about how much of its business was currently connected to the federal government

The company’s focus on Washington as its most lucrative customer was reflected in its decision earlier this year to choose nearby Arlington, Virginia, as one of its two new US headquarters, along with Long Island City, New York.

“Amazon wants to be the interface between all government buyers and all the companies that want to sell to government, and that is an incredibly powerful and lucrative place to be,” Mitchell said.

Amazon declined to comment on questions about how much of its business was currently connected to the federal government.

Rung served as chief US acquisition officer under the Obama administration before she started working at Amazon on 1 November 2016. There she joined the company’s Amazon Business unit and focused on expanding the company’s government contract work.

In just under a year on the job, emails that were obtained through a Freedom of Information Act request show Rung was in contact with Davie, a top GSA official, after the latter said she would be in Seattle and wanted to meet. Rung said it would make “a lot of sense” to meet.

The topic of the meeting was focused on how the government ought to design a new e-commerce portal, even though the legislation that formally mandated the creation of the portal was not yet passed or signed into law.

In one early morning email sent from her hotmail account on 20 September 2017, Rung told Davie that she would like to have a conversation with her – she called it a “gut check” – so that they could discuss their upcoming meeting.

She wrote: “IF the legislation is enacted, I have a sense of how GSA will want to approach this (first you have to select providers, then you will want to implement something incrementally/phased approach), but I want to make sure that I’m not way off the mark. It will help me design a discussion/agenda for our meeting next month.”

When Rung asked Davie if they should wait until after the legislation is passed to discuss it, Davie responded that the administration was planning on moving ahead regardless of the outcome of the bill on Capitol Hill.

Later, in January, the pair exchanged more friendly messages, with Davie asking for Rung’s suggestions on “awesome” candidates to fill a government position, and Rung (using her hotmail account) asking in turn whether Davie knew anyone who could run Amazon Business’s federal government business.

Federal law mandates a “cooling off” period of one year before former senior government officials work on projects that they worked on in government. It is not clear whether Rung’s communication would be considered a violation of this specific ethics law because it is not know what exactly she worked on before leaving the government.

Amazon declined to comment on the details of the exchange or provide any additional information about the Rung/Davie meeting. Amazon said Rung had been compliant with all White House ethics rules. It also said that it had been engaging in “continuous conversations with the GSA” and that it applauded the agency for “transforming the conversation around online portals”.

The GSA said in a statement to the Guardian that it had met with 35 companies in 2017 and 2018 to discuss “existing commercial capabilities and conduct market research” regarding the e-commerce platforms.

“No company has been given special access. Instead, all companies expressing interest in the Commercial Platforms program have equal access to GSA,” the statement said. “We cannot speculate on which companies will be part of the proof of concept until proposals are received, evaluated, and awards are made.”

Lisa Gilbert, the vice-president of legislative affairs at Public Citizen, a consumer advocacy group, said that while she did not believe that the engagement between Rung and Davie was a violation of the law, it was “unsavory” to think that former government officials used their inside knowledge of how the “ballgame” works for their corporate advantage.

“There is nothing inherently wrong in talking to stakeholders who will be impacted by legislation. Our overwhelming worry is that corporate stakeholders have special access that other stakeholders – like public interest groups – do not get,” Gilbert said.

Mitchell, the small business advocate, said the Rung emails “display an inside relationship that other competing companies don’t have” and showed how government infrastructure was being designed with input from Amazon, giving it a big advantage.

“Bezos has been very astute playing to a liberal and conservative audience,” Mitchell said. “Meanwhile the federal government and administration is moving forward on all kinds of things that help Amazon, from the e-commerce portal to the Jedi contract to the tax law, which was a huge boon to Amazon.”

This article was amended on 26 December to correct the name of the General Services Administration. The article had referred to the GSA as the Government Services Authority, which is not correct.