I am working on a Flutter + Typescript-NodeJS application and I need to use Amazon S3 directly from inside my Flutter and also NodeJS code. What I am doing now is keeping my access and secret keys within a .env
file inside my project but I think this is not the safest way to do it. So I researched and found out there is an extension for VSCode named AWS-Toolkit
that gives you the access to work with your AWS server from inside the VSCode, but I couldn't find an example to see how can I use it for my specific "keeping my credentials safe" issue?
For example, how should I replace such a code that uses .env
file:
const accessKeyId = process.env.AWS_ACCESS_KEY_ID
const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY