Skip to content

Releases: Guysnacho/ssg-s3

v2.1.3

20 Mar 22:41
d472c74
Compare
Choose a tag to compare

Scaffold healthy ECS containers

We're successfully building an ECS container using ECR, ECS, and Docker.

Huge accomplishment, all we need to do now is make it public. What we DONT want to do is fully expose an ECS cluster to the internet though so I won't be throwing it in a public subnet this time.

References

Successful Run

image

What's Changed

Full Changelog: v2.1.2...v2.1.3

v2.1.2

20 Mar 22:35
Compare
Choose a tag to compare

Scaffold ECR

Here we'll be trying (and struggling a little bit) to scaffold an Elastic Container Registry resource with permissions needed to receive images from our pipeline. After doing this we save the latest reference to this image in an ssm parameter for later use.

References

Successful Run

image

Full Changelog: v2.1.1...v2.1.2

v2.1.1

20 Mar 22:23
6fa33fe
Compare
Choose a tag to compare

Bundle our app into a Docker Container

Here we're bundling up our app into a Docker image. We'll pivot a bit from this setup but the goal of this task is to learn how to containerize our app.

We build our app and inject outputs from our terraform apply so we can reference our API gateway and hit our lambdas.

Other Changes

  • We also start scaffolding our future ECS module which will be finished in another task

Other Things

Successful Apply

What's Changed

Full Changelog: v1.2.5...v2.1.1

v1.2.5

23 Sep 09:30
Compare
Choose a tag to compare

API Gateway + Catalog Lambda

This one was bigger than expected because I missed some pieces along the way.

  1. I forgot to build a catalog function that returns the current list
  2. My understanding of gateways was a little bit off
  • Responses are normalized so I made sure my responses are consistent
  • I thought I needed an openapi spec but that was wrong too

So now we've got 3 total lambdas along with consistent responses from all of em. We've also got a quantity counter on each of our product listings. Might've cut corners on this one a little bit when it comes to the site but glad everything came out alright.

Its actually in a usable state, only thing left would be payment processing and you could....technically go live.

Other Changes

  • Since there's a chance our gateway's id can change in between runs, I made a job output for it.
    • Check #ac0ab6329fa78b3d623c56089837bf76fec73063
  • Added a catalog lambda to return a list of products available
    • Light oversight. Yeah we need to be able to interact with the store but unless I passed DB credentials to the site, I'll never know the current state
  • Updated Lambda packages and web client's method calls
    • There were some quirks that I've mentioned above

Screenies

Successful sale thru gateway

image

Site, lambdas, gateway, and RDS are LIVE

image

What's Changed

Full Changelog: v1.2.4...v1.2.5

v1.2.4

19 Sep 05:00
Compare
Choose a tag to compare

Sale Lambda

Its always easier after the first try.

Sale lambda complete, does an insert into the orders table and thanks to the trigger we setup we don't have to write another 2 queries to check if we can decrement stock counts and then to actually decrement.

image

Work Done

Most of the work done is on the database side. That's writing the trigger and function that handle decrementing stock counts and making sure they actually work as expected. In your own time I recommend

  • Uncommenting and testing the queries at the bottom of fixtures/sql/2_build_sale_tables.sql
  • Learning when the database exceptions are raised
  • Understanding that the initial insert into the orders table is rolled back since the subsequent trigger fails
  • Understanding that you now have peace of mind and less code written

What's Changed

Full Changelog: v1.2.3...v1.2.4

v1.2.3

18 Sep 04:40
87e8c2e
Compare
Choose a tag to compare

Auth Lambda (p.1)

So we've got a lambda that can sign people up to our store. All it does is insert a row into our database when given particular params.
I say part 1 because there's no login functionality setup yet but I didn't want to lose my sanity in the process of making this lambda. Implement that however you want :>

Work Done

This one was huuuuuge. Yeah its scaffolding the lambda but it was also

  • adding final touches on the database
    • new member table
    • testing insert queries
    • cementing egress and ingress settings
    • rolling back from Aurora because its EXPENSIVE. Got a cute lil "You've spent $200 in about 48 hours" alert and decided to run back to normal RDS.
  • cementing the project structure so we have packages uploaded properly
  • Let terraform do the file uploads for us
  • granting secret access to the Lambda
  • learning that you can't throw a Lambda into a VPC and expect good things

What's Changed

Full Changelog: v1.2.2...v1.2.3

v1.2.2

17 Sep 05:37
9f1a2d2
Compare
Choose a tag to compare

Time for a pat on the back

Sooooo we got em. Scaffolding a db in AWS is pretty simple but getting access to it from an external client like a database admin that just wants to make some tables for their storefront turned out to be a task.

Learned a lot though. VPCs, subnets within them, and security group rules will be the death of me. I'm making a story just to talk about them.

That to the side we've got an aurora database in AWS within a VPC that allows ingress and egress. All that's left is logging into our DB and running some queries in the database we specified in our db.tf file to make a schema and some tables.

image
image

What's Changed

Full Changelog: v1.2.1...v1.2.2

v1.2.1

11 Sep 09:58
Compare
Choose a tag to compare

Store Placeholders

🌱 Apply, Build, Deploy 🌿
Finally replaced the starter page with a bare storefront. Hardcoded listings and placeholders for purchase, sign in, and sign up requests.
image
image
image

What's Changed

Deployed Demo

image

Full Changelog: v1.1.3...v1.2.1

v1.1.3

27 Aug 10:47
Compare
Choose a tag to compare
Successfully paved a CloudFront distribution

image

Can access it with the CloudFront url ✨

image

What's Changed

Full Changelog: v1.1.2...v1.1.3

v1.1.2

18 Jul 04:10
Compare
Choose a tag to compare

Public Site Access

What's Changed

  • Automate apply, fix S3 uploads, hide secrets by @Guysnacho in #8

Good Build
image
Good uploads
image
Public site 😄
image

Full Changelog: v1.1.1...v1.1.2