AWS for a hackathon: create one IAM user or role with only the AI services you call
@devsingh05▲ 10 net votes
Root account access keys are a bad idea, and so is AdministratorAccess on a key that ends up in a laptop .env. Create an IAM user (or use IAM Identity Center with aws sso login) with a policy that allows just what the app uses, for example bedrock:InvokeModel, rekognition:DetectLabels, s3:PutObject on one bucket. Keep keys in .env, add .env to .gitignore before the first commit, and delete the keys after the event. GitHub push protection catches many leaked AWS keys, but not all.