Introducing, a S3 type provider for F#

Yan Cui

I help clients go faster for less using serverless technologies.

This article is brought to you by

Don’t reinvent the patterns. Catalyst gives you consistent APIs for messaging, data, and workflow with key microservice patterns like circuit-breakers and retries for free.

Try the Catalyst beta

I work with Amazon S3, and indeed many of the Amazon’s cloud services, and one of the things that is often frustrating in my day-to-day workflow is the need to keep jumping out of the IDE, find the files I’m looking for in a S3 explorer, grab the key to the file and then go back to the IDE and write code against the AWS SDK to read the data from S3 and do something with that data.

This inefficiency in my development process is magnified when working against buckets with large number of keys and/or buckets which has versioning turned on.

With these in mind, I wanted to create a type provider which is:

  • able to interactively navigate buckets, folders and files in S3
  • able to retrieve data easily in either binary of simple text format
  • able to search for files easily

plus all the usual goodness that comes with F# type providers, such as:

  • not having to leave the IDE and let the provider do all the hard work for me
  • have static type safety with regards to the file structure in S3 (if someone deletes/renames a file or folder I will be informed via a compile time error rather than a runtime exception!)

 

After a few nights of work I finally have something that’s of usable shape, here is a quick demo video I’ve prepared of the type provider in action:

 

The source code for the type provider is open source and can be found here, you can also grab it from Nuget here.

Go on, give it a play and let me know if you have any feedbacks!

 

Enjoy!

Whenever you’re ready, here are 3 ways I can help you:

  1. Production-Ready Serverless: Join 20+ AWS Heroes & Community Builders and 1000+ other students in levelling up your serverless game. This is your one-stop shop for quickly levelling up your serverless skills.
  2. I help clients launch product ideas, improve their development processes and upskill their teams. If you’d like to work together, then let’s get in touch.
  3. Join my community on Discord, ask questions, and join the discussion on all things AWS and Serverless.

Leave a Comment

Your email address will not be published. Required fields are marked *