anomalyco/sst · error
no aws provider found
Error message
no aws provider found
What it means
AwsResource.config() requires an 'aws' provider to be present in the SST project; this error is thrown when project.Provider("aws") finds none. Any AWS-backed resource (bucket files, distributions, function code updates, KV, etc.) calling config() during Create/Update/Delete fails. It means the app's configuration does not define an AWS provider, so no AWS credentials/region can be resolved.
Source
Thrown at pkg/server/resource/resource.go:60
type UpdateResult[T any] struct {
Outs T `json:"outs"`
}
type DeleteInput[T any] struct {
ID string `json:"id"`
Outs T `json:"outs"`
}
type AwsResource struct {
context context.Context
project *project.Project
}
func (a *AwsResource) config() (aws.Config, error) {
result, ok := a.project.Provider("aws")
if !ok {
return aws.Config{}, fmt.Errorf("no aws provider found")
}
casted := result.(*provider.AwsProvider)
return casted.Config(), nil
}
func Register(ctx context.Context, p *project.Project, r *rpc.Server) error {
awsResource := &AwsResource{ctx, p}
cloudflareResource := &CloudflareResource{ctx, p}
vercelResource := &VercelResource{ctx, p}
r.RegisterName("Resource.Run", NewRun())
// AWS Resources
r.RegisterName("Resource.Aws.BucketFiles", &BucketFiles{awsResource})
r.RegisterName("Resource.Aws.DistributionDeploymentWaiter", &DistributionDeploymentWaiter{awsResource})
r.RegisterName("Resource.Aws.DistributionInvalidation", &DistributionInvalidation{awsResource})
r.RegisterName("Resource.Aws.FunctionCodeUpdater", &FunctionCodeUpdater{awsResource})
r.RegisterName("Resource.Aws.FunctionEnvironmentUpdate", &FunctionEnvironmentUpdate{awsResource})
r.RegisterName("Resource.Aws.HostedZoneLookup", &HostedZoneLookup{awsResource})View on GitHub (pinned to a0bd20f762)
Solutions
- Ensure sst.config.ts defines an AWS provider (explicit sst provider or implicit via AWS components) and redeploy
- Set AWS credentials (AWS_PROFILE, AWS_ACCESS_KEY_ID/SECRET, or SSO login) so the provider initializes
- If the resource is no longer wanted, remove it from the app/state instead of updating it
- Check that the provider is not renamed away from the "aws" key
Example fix
// before (no aws provider)
// sst.config.ts only has cloudflare provider
// after
const awsProvider = new providerAws("aws", { region: "us-east-1" }); Defensive patterns
Strategy: validation
Validate before calling
// in sst.config.ts, before using AWS components
if (!app.providers?.aws && !process.env.AWS_PROFILE && !process.env.AWS_ACCESS_KEY_ID) {
throw new Error("Define an aws provider in sst.config.ts or set AWS credentials");
} Try / catch
if err := resource.Create(ctx, input); err != nil {
if strings.Contains(err.Error(), "no aws provider found") {
return fmt.Errorf("app config has no aws provider; add one to sst.config.ts: %w", err)
}
return err
} Prevention
- Always declare an aws provider (explicit or via an AWS component) before using Resource.Aws.* resources
- Keep the provider name literally "aws"
- Run `sst deploy` after config changes so providers are re-initialized
- Log in with AWS SSO / set credentials before deploying
When it happens
Trigger: A resource registered under Resource.Aws.* is created/updated/deleted while the project has no provider named "aws" — e.g. sst.config.ts never creates provider.aws or the app targets another cloud only.
Common situations: Using an AWS component without an implicit/default AWS provider in a config that removed it; renaming the provider so it's no longer keyed "aws"; running against a Cloudflare/Vercel-only app; stale state referencing AWS resources after switching clouds.
Related errors
- No AWS credentials found
- Proxy is not enabled. Enable it with "proxy: true".
- Cannot access `nodes.loadBalancer` when no public ports are
- You must provide the ports to expose via "loadBalancer.rules
- You must provide a container name in "loadBalancer.rules" wh
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/3d8e766cc3880c63.
Report an issue: GitHub.