Write the root user's access key in the code.
The root user has the most powerful privileges in the account, and embedding its credentials in code is extremely dangerous.
The damage if leaked is enormous, and it is the opposite of a recommended method, so it is incorrect.