Cheesecake Bytes 🍰

On solving your own problems

I solved my own problem. Did a solution exist already? I don't actually know for certain. With the amount of tooling available to work with AWS day-to-day, I suspect so.

At work, we are heavy users of AWS and with that comes the need to manage AWS credentials. These profiles can be found at ~/aws/credentials and I often tend to forget which ones are still valid. In my defence, we do practice "the principle of least privilege" and are issued with credentials specific to the tasks we need to carry out.

Instead of wondering which credentials are valid, I now simply run awscred clean and voila, invalid credentials have been purged. You best believe I have unit tests for this functionality 😉.

awscred clean

Now that we know which credentials are valid, I can easily run commands within the context of a particular profile. Below is an example of running a Serverless Framework command.

sls-apply

Feel free to check out the package yourself if interested. Comments and issues are always welcome.

When choosing a side project, you will often hear developers suggest building something you will actually use. Or solve a problem you have. In practice, this is much harder than it seems! I count myself lucky to have somewhat completed this side project and that it's useful to me.

I wish I could end this post by saying this usefulness was the motivation that kept me going. But honestly, it was the relentless pursuit of trying to do a little each day. I never mentioned this at the start, but I built the CLI using Go. I am trying to pick up the language again and become proficient in it.

In essence, I started this project to learn more about Go and scratch my own itch along the way. I thought the takeaway would be something about the programming language. Instead, I learned first-hand just how powerful working on something each day can be.

So definitely attempt to solve your own problems, the learnings might surprise you.

#aws #go #side-project