Consider about where to store an endpoint before deciding to use API gateway.

Tomoharu Tsutsumi
2 min readSep 7, 2024

I have been studying AWS recently, and I managed to come up with an idea of a service. However, I gave it up. I’ll summarize the story.

The service’s specification

I’m working as a freelance software engineer, and I have to calculate how long I worked this month every month to give a company a billing. Sometimes, it is so boring that I tried to automate it. The tech I was going to use was…

Frontend: HTML

backend: Go

That’s all. Super simple. I don’t want to do complex stuff.

Besides, the architecture in my mind was…

Like this.

The html file is in S3 and the Go file is in Lambda. Looked good.

A problem I faced

However, I faced a problem where I should store an endpoint generated by API gateway…

It is too dangerous to hardcode the endpoint in html files. There were two options.

  • Adopt environment variables by using Javascript FW.
  • Give up the architecture and use EC2.

My decision

I gave up both of them because,

it is too costly to use Javascript FW for only managing environment variables. Besides, using EC2 was not attractive to me because I had the experience in using it.

Therefore, I gave up this service, but I learned great stuff, which is we need to consider about where to store environment variables before deciding to use API gateway.

Feel free to reach out to me on LinkedIn, which you can find below. Looking forward to connecting!

https://www.linkedin.com/in/tomoharu-tsutsumi-56051a126/

--

--

Tomoharu Tsutsumi
Tomoharu Tsutsumi

Written by Tomoharu Tsutsumi

Senior Software Engineer at two industry-leading startups ( Go | Ruby | TypeScript | JavaScript | Gin | Echo | Rails | React | Redux | Next)

No responses yet