Skip to content

AppSyncDataSource

Reference doc for the `sst.aws.AppSyncDataSource` component.

The AppSyncDataSource component is internally used by the AppSync component to add data sources to AWS AppSync.

You’ll find this component returned by the addDataSource method of the AppSync component.


Constructor

new AppSyncDataSource(name, args, opts?)

Parameters

Properties

name

Type Output<string>

The name of the data source.

nodes

Type Object

The underlying resources this component creates.

nodes.dataSource

Type DataSource

The Amazon AppSync DataSource.

nodes.function

Type Output<Function>

The Lambda function used by the data source.

nodes.serviceRole

Type Role

The DataSource service IAM role.

DataSourceArgs

apiComponentName

Type string

The AppSync component name.

apiId

Type Input<string>

The AppSync GraphQL API ID.

dynamodb?

Type Input<string>

The ARN for the DynamoDB table.

{
name: "dynamoDS",
dynamodb: "arn:aws:dynamodb:us-east-1:123456789012:table/my-table"
}

elasticSearch?

Type Input<string>

The ARN for the Elasticsearch domain.

{
name: "elasticSearchDS",
elasticSearch: "arn:aws:es:us-east-1:123456789012:domain/my-domain"
}

eventBridge?

Type Input<string>

The ARN for the EventBridge event bus.

{
name: "eventBridgeDS",
eventBridge: "arn:aws:events:us-east-1:123456789012:event-bus/my-event-bus"
}

http?

Type Input<string>

The URL for the HTTP endpoint.

{
name: "httpDS",
http: "https://api.example.com"
}

lambda?

Type Input<string | FunctionArgs>

The ARN for the Lambda function.

{
name: "lambdaDS",
lambda: "arn:aws:lambda:us-east-1:123456789012:function:my-function"
}

name

Type string

The name of the data source.

{
name: "lambdaDS",
lambda: "arn:aws:lambda:us-east-1:123456789012:function:my-function"
}

openSearch?

Type Input<string>

The ARN for the OpenSearch domain.

{
name: "openSearchDS",
openSearch: "arn:aws:opensearch:us-east-1:123456789012:domain/my-domain"
}

rds?

Type Input<Object>

Configuring RDS data source.

{
name: "rdsDS",
rds: {
cluster: "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster",
credentials: "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret"
}
}

rds.cluster

Type Input<string>

The ARN for the RDS cluster.

rds.credentials

Type Input<string>

The ARN for the credentials secret store.

transform?

Type Object

Transform how this component creates its underlying resources.

transform.dataSource?

Type DataSourceArgs | (args: DataSourceArgs => void)

Transform the AppSync DataSource resource.

transform.serviceRole?

Type RoleArgs | (args: RoleArgs => void)

Transform the AppSync DataSource service role resource.