{"record":{"id":"3d8e766cc3880c63","repo":"anomalyco/sst","slug":"no-aws-provider-found","errorCode":null,"errorMessage":"no aws provider found","messagePattern":"no aws provider found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/server/resource/resource.go","lineNumber":60,"sourceCode":"\ntype UpdateResult[T any] struct {\n\tOuts T `json:\"outs\"`\n}\n\ntype DeleteInput[T any] struct {\n\tID   string `json:\"id\"`\n\tOuts T      `json:\"outs\"`\n}\n\ntype AwsResource struct {\n\tcontext context.Context\n\tproject *project.Project\n}\n\nfunc (a *AwsResource) config() (aws.Config, error) {\n\tresult, ok := a.project.Provider(\"aws\")\n\tif !ok {\n\t\treturn aws.Config{}, fmt.Errorf(\"no aws provider found\")\n\t}\n\tcasted := result.(*provider.AwsProvider)\n\treturn casted.Config(), nil\n}\n\nfunc Register(ctx context.Context, p *project.Project, r *rpc.Server) error {\n\tawsResource := &AwsResource{ctx, p}\n\tcloudflareResource := &CloudflareResource{ctx, p}\n\tvercelResource := &VercelResource{ctx, p}\n\tr.RegisterName(\"Resource.Run\", NewRun())\n\t\n\t// AWS Resources\n\tr.RegisterName(\"Resource.Aws.BucketFiles\", &BucketFiles{awsResource})\n\tr.RegisterName(\"Resource.Aws.DistributionDeploymentWaiter\", &DistributionDeploymentWaiter{awsResource})\n\tr.RegisterName(\"Resource.Aws.DistributionInvalidation\", &DistributionInvalidation{awsResource})\n\tr.RegisterName(\"Resource.Aws.FunctionCodeUpdater\", &FunctionCodeUpdater{awsResource})\n\tr.RegisterName(\"Resource.Aws.FunctionEnvironmentUpdate\", &FunctionEnvironmentUpdate{awsResource})\n\tr.RegisterName(\"Resource.Aws.HostedZoneLookup\", &HostedZoneLookup{awsResource})","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/pkg/server/resource/resource.go#L42-L78","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (no aws provider)\n// sst.config.ts only has cloudflare provider\n// after\nconst awsProvider = new providerAws(\"aws\", { region: \"us-east-1\" });","handlingStrategy":"validation","validationCode":"// in sst.config.ts, before using AWS components\nif (!app.providers?.aws && !process.env.AWS_PROFILE && !process.env.AWS_ACCESS_KEY_ID) {\n  throw new Error(\"Define an aws provider in sst.config.ts or set AWS credentials\");\n}","typeGuard":null,"tryCatchPattern":"if err := resource.Create(ctx, input); err != nil {\n    if strings.Contains(err.Error(), \"no aws provider found\") {\n        return fmt.Errorf(\"app config has no aws provider; add one to sst.config.ts: %w\", err)\n    }\n    return err\n}","preventionTips":["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"],"tags":["aws","provider","configuration","credentials"],"backgroundTag":"missing-provider-configuration","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}