Closed slackermorris closed 1 year ago
This is the endpoint that I am intending to hit:
It seems for each request that I have to create a salted string and sign the request with it:
Perhaps I can use this to hardcode the values before I install any dependencies to manage the same salting:
I need access to the API. If I don't get it then I will have to parse the RSS feed. Yikes.
The API is in beta. I need to request access to it. Alternatively, I can export and import my data using CSV. This truly might be my only option.
Read Path
I would have to make an export of my data. It's gzipped so I would have to unzip it and then file search it. Since I don't have access to the API I would have to perform this action via a headless browser or something similar.
Write Path
I would have to do the above in reverse. This would be hugely problematic. Again, I'd have to use a headless browser or equivalent.
Something like an on demand headless browser that assumes my credentials and logs into Letterboxd and performs the relevant actions. This seems a little strange.
I am thinking that it might be more beneficial to stand up my own datasource. Likely using a Serverless Stack.
I guess one of my questions at the moment will be whether or not I want to include this code in my existing astro project or not.
Yeah, it feels like it would be way easier to stand a Serverless Stack project up and just expose endpoints off it.
This might not be relevant, but it seems interesting:
For this to work I likely have to enable SSR as well. I think this requires installing an adapter.
Yeah, the content is dynamic. There is no way that I can use SSG for this.
I should be making use of SSR adapters. Or a different framework.
Regardless of whether I can use the aws-sdk
in the current Astro project or not, those resources I am interfacing with need to be on AWS somehow. So, my best bet is to write my own backend. I'll use a Serverless Stack.
Lol, this is the exact adapter I need:
Drop a deployment solution (Serverless Stack, AWS) into your chosen framework
It scaffolds a monorepo. We can write serverless functions.
This is a tutorial that involves building a SST project:
I think it will be a good idea to review the permissions specified here.
TBH I think this is a whole other thing to be done. I need to pull my head around IAM policies. I think once I do this that using something like this: an analyser of AWS activity to determine policies for a user, would be the best thing to use.
Also, refer to this, perhaps set up a DynamoDB and try to set an item into it.
We have deployment.
I should stand a Dynamo table up. See how it feels. I think it is really important to better understand DynamoDB and how it works to leverage how it stores data.
This is what I am referring to.
Hmmm. It seems like my project structure is a bit amiss.
SST and Astro tutorial.
Actually, I don't think I need to make any changes. As per.
Ahhh 👇. I see now.
I got the table stood up.
I think I need to get rid of the bottom two resources. I don't deploy this to this region anymore. It is an artefact of first deployments.
This is how to read from Dynamo using a Lambda we have written in the packages > fns
directory. Then I'm not sure how Astro can consume this endpoint.
I wonder if we can use the aws-sdk > DynamoDB client
directly in the front matter of the Astro pages?
There is potential here to integrate ElectroDB. But I think I should consider this someplace else down the line.
I really need to review the "Architectural Section" of this video to better understand what is happening here.
This is also a great resource.
This helped me to understand how to test lambdas locally.
This is what I am using to create the POST
endpoint for creating a user.
I'll then need to integrate this with the Astro project. I think I can make a call to the endpoint in the front matter.
I had all my .sst
files checked in.
This helped me confirm that they shouldn't be.
This is handy but it is super outdated as well.
These two are equivalent when recommending how to add consume DynamoDB in a lambda handler.
What is npx sst dev
used for?
What is sst bind
used for?
I would really like to clear up the scripts section. Get things to run as pre
scripts/sequentially.
https://api-docs.letterboxd.com/