We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

SDKs and S3

An SDK or "Software Development Kit" is just a collection of tools (often involving an importable library) that helps you interact with a specific service or technology.

AWS has official SDKs for most popular programming languages. They're usually the best way to interact with AWS services.

Don't roll your own crypto, and don't roll your own AWS SDK.

When you as a human interact with AWS resources, you'll typically use the web console (GUI) or the CLI. When your code interacts with AWS resources, you'll use the SDK within your code.

Assignment

You've escaped writing code for a while - this one will have you write a lot of code and might take a bit of time, that's okay!

Bun provides integration with AWS S3 with a blazingly fast S3 API.

Bun relies on environment variables for credentials, but you can explicitly set the credentials if you prefer.

      • The file key. Use the video ID as the key. e.g. <videoId>.mp4
      • The file contents (body). You can use Bun.file() to read the contents of the file in the temporary path.
      • Content type, which is the MIME type of the file.
      • The video is correctly uploaded to your S3 bucket.
      • The video_url in your database is updated with the S3 bucket and key (and thus shows up in the web UI)

Run and submit the CLI tests.