AWS SAM connector reference
This section contains reference information for the AWS Serverless Application Model (AWS SAM) connector resource type. For an introduction to connectors, see Managing resource permissions with AWS SAM connectors.
Supported source and destination resource types for connectors
The AWS::Serverless::Connector
resource type supports a select number of connections between source
and destination resources. When configuring connectors in your AWS SAM template, use the following table to reference
supported connections and the properties that need to be defined for each source and destination resource type.
For more information about configuring connectors in your template, see
AWS::Serverless::Connector.
For both source and destination resources, when defined within the same template, use the Id
property. Optionally, a Qualifier
can be added to narrow the scope of your defined resource. When
the resource is not within the same template, use a combination of supported properties.
To request new connections, submit a new issue
Source type | Destination type | Permissions | Source properties | Destination properties |
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IAM policies created by connectors
This section documents the AWS Identity and Access Management (IAM) policies that are created by AWS SAM when using connectors.
AWS::DynamoDB::Table
toAWS::Lambda::Function
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:DescribeStream", "dynamodb:GetRecords", "dynamodb:GetShardIterator", "dynamodb:ListStreams" ], "Resource": [ "%{Source.Arn}/stream/*" ] } ] }
AWS::Events::Rule
toAWS::SNS::Topic
-
Policy type
AWS::SNS::TopicPolicy
attached to theAWS::SNS::Topic
.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Resource": "%{Destination.Arn}", "Action": "sns:Publish", "Condition": { "ArnEquals": { "aws:SourceArn": "%{Source.Arn}" } } } ] }
AWS::Events::Rule
toAWS::Events::EventBus
-
Policy type
Customer managed policy attached to the
AWS::Events::Rule
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "events:PutEvents" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Events::Rule
toAWS::StepFunctions::StateMachine
-
Policy type
Customer managed policy attached to the
AWS::Events::Rule
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "states:StartExecution" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Events::Rule
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "events.amazonaws.com", "SourceArn": "%{Source.Arn}" }
AWS::Events::Rule
toAWS::SQS::Queue
-
Policy type
AWS::SQS::QueuePolicy
attached to theAWS::SQS::Queue
.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Resource": "%{Destination.Arn}", "Action": "sqs:SendMessage", "Condition": { "ArnEquals": { "aws:SourceArn": "%{Source.Arn}" } } } ] }
AWS::Lambda::Function
toAWS::Lambda::Function
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "lambda:InvokeAsync", "lambda:InvokeFunction" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Lambda::Function
toAWS::S3::Bucket
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectLegalHold", "s3:GetObjectRetention", "s3:GetObjectTorrent", "s3:GetObjectVersion", "s3:GetObjectVersionAcl", "s3:GetObjectVersionForReplication", "s3:GetObjectVersionTorrent", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:ListBucketVersions", "s3:ListMultipartUploadParts" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/*" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "s3:AbortMultipartUpload", "s3:DeleteObject", "s3:DeleteObjectVersion", "s3:PutObject", "s3:PutObjectLegalHold", "s3:PutObjectRetention", "s3:RestoreObject" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/*" ] } ] }
AWS::Lambda::Function
toAWS::DynamoDB::Table
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:Query", "dynamodb:Scan", "dynamodb:BatchGetItem", "dynamodb:ConditionCheckItem", "dynamodb:PartiQLSelect" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:BatchWriteItem", "dynamodb:PartiQLDelete", "dynamodb:PartiQLInsert", "dynamodb:PartiQLUpdate" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
AWS::Lambda::Function
toAWS::SQS::Queue
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "sqs:ReceiveMessage", "sqs:GetQueueAttributes" ], "Resource": [ "%{Destination.Arn}" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "sqs:DeleteMessage", "sqs:SendMessage", "sqs:ChangeMessageVisibility", "sqs:PurgeQueue" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Lambda::Function
toAWS::SNS::Topic
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "sns:Publish" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Lambda::Function
toAWS::StepFunctions::StateMachine
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "states:StartExecution", "states:StartSyncExecution" ], "Resource": [ "%{Destination.Arn}" ] }, { "Effect": "Allow", "Action": [ "states:StopExecution" ], "Resource": [ "arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:%{Destination.Name}:*" ] } ] }
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "states:DescribeStateMachine", "states:ListExecutions" ], "Resource": [ "%{Destination.Arn}" ] }, { "Effect": "Allow", "Action": [ "states:DescribeExecution", "states:DescribeStateMachineForExecution", "states:GetExecutionHistory" ], "Resource": [ "arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:%{Destination.Name}:*" ] } ] }
AWS::Lambda::Function
toAWS::Events::EventBus
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "events:PutEvents" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::Lambda::Function
toAWS::Location::PlaceIndex
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "geo:DescribePlaceIndex", "geo:GetPlace", "geo:SearchPlaceIndexForPosition", "geo:SearchPlaceIndexForSuggestions", "geo:SearchPlaceIndexForText" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::ApiGatewayV2::Api
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "apigateway.amazonaws.com", "SourceArn": "arn:${AWS::Partition}:execute-api:${AWS::Region}:${AWS::AccountId}:%{Source.ResourceId}/%{Source.Qualifier}" }
AWS::ApiGateway::RestApi
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "apigateway.amazonaws.com", "SourceArn": "arn:${AWS::Partition}:execute-api:${AWS::Region}:${AWS::AccountId}:%{Source.ResourceId}/%{Source.Qualifier}" }
AWS::SNS::Topic
toAWS::SQS::Queue
-
Policy type
AWS::SQS::QueuePolicy
attached to theAWS::SQS::Queue
.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Principal": { "Service": "sns.amazonaws.com" }, "Resource": "%{Destination.Arn}", "Action": "sqs:SendMessage", "Condition": { "ArnEquals": { "aws:SourceArn": "%{Source.Arn}" } } } ] }
AWS::SNS::Topic
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "sns.amazonaws.com", "SourceArn": "%{Source.Arn}" }
AWS::SQS::Queue
toAWS::Lambda::Function
-
Policy type
Customer managed policy attached to the
AWS::Lambda::Function
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "sqs:DeleteMessage" ], "Resource": [ "%{Source.Arn}" ] } ] }
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "sqs:ReceiveMessage", "sqs:GetQueueAttributes" ], "Resource": [ "%{Source.Arn}" ] } ] }
AWS::S3::Bucket
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "s3.amazonaws.com", "SourceArn": "%{Source.Arn}", "SourceAccount": "${AWS::AccountId}" }
AWS::StepFunctions::StateMachine
toAWS::Lambda::Function
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "lambda:InvokeAsync", "lambda:InvokeFunction" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::SNS::Topic
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "sns:Publish" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::SQS::Queue
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "sqs:SendMessage" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::S3::Bucket
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectLegalHold", "s3:GetObjectRetention", "s3:GetObjectTorrent", "s3:GetObjectVersion", "s3:GetObjectVersionAcl", "s3:GetObjectVersionForReplication", "s3:GetObjectVersionTorrent", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:ListBucketVersions", "s3:ListMultipartUploadParts" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/*" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "s3:AbortMultipartUpload", "s3:DeleteObject", "s3:DeleteObjectVersion", "s3:PutObject", "s3:PutObjectLegalHold", "s3:PutObjectRetention", "s3:RestoreObject" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/*" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::DynamoDB::Table
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:Query", "dynamodb:Scan", "dynamodb:BatchGetItem", "dynamodb:ConditionCheckItem", "dynamodb:PartiQLSelect" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:BatchWriteItem", "dynamodb:PartiQLDelete", "dynamodb:PartiQLInsert", "dynamodb:PartiQLUpdate" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::StepFunctions::StateMachine
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "states:DescribeExecution" ], "Resource": [ "arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:%{Destination.Name}:*" ] }, { "Effect": "Allow", "Action": [ "events:DescribeRule" ], "Resource": [ "arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:rule/StepFunctionsGetEventsForStepFunctionsExecutionRule" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "states:StartExecution" ], "Resource": [ "%{Destination.Arn}" ] }, { "Effect": "Allow", "Action": [ "states:StopExecution" ], "Resource": [ "arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:%{Destination.Name}:*" ] }, { "Effect": "Allow", "Action": [ "events:PutTargets", "events:PutRule" ], "Resource": [ "arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:rule/StepFunctionsGetEventsForStepFunctionsExecutionRule" ] } ] }
AWS::StepFunctions::StateMachine
toAWS::Events::EventBus
-
Policy type
Customer managed policy attached to the
AWS::StepFunctions::StateMachine
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "events:PutEvents" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::AppSync::DataSource
toAWS::DynamoDB::Table
-
Policy type
Customer managed policy attached to the
AWS::AppSync::DataSource
role.Access categories
Read
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:Query", "dynamodb:Scan", "dynamodb:BatchGetItem", "dynamodb:ConditionCheckItem", "dynamodb:PartiQLSelect" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:BatchWriteItem", "dynamodb:PartiQLDelete", "dynamodb:PartiQLInsert", "dynamodb:PartiQLUpdate" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}/index/*" ] } ] }
AWS::AppSync::DataSource
toAWS::Lambda::Function
-
Policy type
Customer managed policy attached to the
AWS::AppSync::DataSource
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "lambda:InvokeAsync", "lambda:InvokeFunction" ], "Resource": [ "%{Destination.Arn}", "%{Destination.Arn}:*" ] } ] }
AWS::AppSync::DataSource
toAWS::Events::EventBus
-
Policy type
Customer managed policy attached to the
AWS::AppSync::DataSource
role.Access categories
Write
{ "Statement": [ { "Effect": "Allow", "Action": [ "events:PutEvents" ], "Resource": [ "%{Destination.Arn}" ] } ] }
AWS::AppSync::GraphQLApi
toAWS::Lambda::Function
-
Policy type
AWS::Lambda::Permission
attached to theAWS::Lambda::Function
.Access categories
Write
{ "Action": "lambda:InvokeFunction", "Principal": "appsync.amazonaws.com", "SourceArn": "arn:${AWS::Partition}:appsync:${AWS::Region}:${AWS::AccountId}:apis/%{Source.ResourceId}" }