Providers

Nitric can declare and interact with cloud features in a cloud agnostic way. A provider is the abstraction layer that enables this.

Providers are individual plugins composed of logic to deploy your services, as well as handling SDK calls at runtime. The code you write declares a number of resources, services, and permissions. The deployment component of the provider takes this specification of what you want, and provisions that as actual infrastructure. The runtime component will take the abstract calls that you make to the SDK at runtime, like calling .read() on a file, and convert that into cloud-specific API calls.

Find out more about how the Nitric CLI and SDK interact with providers on our concepts page.

Standard Providers

There are 3 standard providers which are built and maintained by Nitric. These providers enable deploying and running your code across AWS, Google Cloud, and Azure. The following is the underlying cloud services that each of the standard providers use:

ResourceAWSAzureGoogle CloudLocal
APIsAPI GatewayAPI ManagementAPI GatewayCustom
Key Value Stores DynamoDBCosmos DBFireStoreBoltDB
Messaging: TopicsSNSEvent GridPubSubCustom
Messaging: QueuesSQSStorage QueuesPubSubCustom
SchedulesCloudWatch Event BridgeDapr BindingCloud Schedulercurrently unavailable
SecretsSecrets ManagerKey VaultSecret ManagerCustom
StorageS3Blob StorageCloud StorageSeaweedFS
ServicesLambdaContainer AppsCloudRunDocker

Deployment

The deployment component of the Nitric standard providers are built using Pulumi. So when you declare your bucket in Nitric code like this:

const images = bucket('image').for('reading')

the AWS provider is just taking that request for a bucket and deploying it with Pulumi:

s3Bucket, err = s3.NewBucket(ctx, "images")

Runtime

The runtime component of these providers is implemented using the cloud APIs. So when you read from a file like this:

images.file('cat.png').read()

the AWS provider is taking that request and converting it to an AWS API call:

response, err := s3.GetObject(ctx, &s3.GetObjectInput{
  Bucket: "images",
  Key:    aws.String("cat.png"),
})

Our code is completely open-source on our GitHub, so you can know exactly how your resources are being deployed and handled at runtime.

If you have any questions or are curious about building your own custom provider, you can read further documentation here or ask our team any questions on Discord.