Hiding AWS Credentials

Ok so I am very beginner with coding and I am trying to deploy an app that is connected with a AWS bucket to pull some files to display on the app. I initially had the bucket credentials and keys on the main code but when trying to create a new GitHub Repository, I got the warning that allowing the secret will risk exposure. How do I go about hiding from the code?
Thanks!

For the Community Cloud, check secrets management in the docs: