My current situation is that I want to do api calls with aws lambda, and the api calls require a token. I currently store the token in an s3 bucket and just retrieve it whenever necessary, and get a new token should the one in the bucket expires. However, I was told that storing tokens in an s3 bucket isn't a good practice, but wasn't given a better alternative. The lambda takes around 30 seconds to finish running and it will most likely be called 1000+ times. I believe the token expires after 2 hours.
I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.
Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.
As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.
Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.