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!

go get github.com/aws/aws-sdk-go-v2/service/s3 github.com/aws/aws-sdk-go-v2/config
      • The bucket name
      • The file key. Use the same <random-32-byte-hex>.ext format as the key. e.g. 1a2b3c4d5e6f7890abcd1234ef567890.mp4
      • The file contents (body). The temp file is an os.File which implements io.Reader
      • 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.