Fixing Fullstackbulletin.com part 8 - Twitch Live Stream

Subscribers:
950
Published on ● Video Link: https://www.youtube.com/watch?v=iz6Cxg7-tVk



Duration: 1:16:02
38 views
0


In this session we refactored we refactored and tested our Rust lambda.

This lambda scrapes a page from Mailchimp and extracts the issue number of the latest published newsletter.

We removed all the unwraps and did proper error handling using the crate thiserror (https://docs.rs/thiserror/latest/thiserror/).

We then externalised the URL and made it something configurable using an environment variable.

Finally, we did some additional testing and mocking, also using an HTTP mocking library called httpmock (https://docs.rs/httpmock/latest/httpmock/).

All the changes are published as part of this PR: https://github.com/FullStackBulletin/sls-create-newsletter-issue/pull/75

In the following live streams, we will update the other lambdas to use the issue number and we might also start to migrate some of the existing lambdas to Rust.

You can follow the next live streams at https://twitch.tv/loige

All the code is available at https://github.com/FullStackBulletin

Finally, if you want to subscribe FullStackBulletin, check it out at: https://fullstackbulletin.com/







Tags:
Rust
Lambda
Refactoring
Testing
Error Handling
thiserror crate
Environment Variable
HTTP Mocking
httpmock library
AWS
Serverless
Cloud
AWS Lambda
Cloud Development
Live Stream
Code
GitHub
Pull Request
Migration
Twitch
FullStackBulletin
Subscription