- Stitch >
- External Services >
- Built-In Services
AWS Service¶
On this page
Overview¶
Amazon Web Services (AWS) provides an extensive collection of cloud-based services. Stitch provides a generic AWS service that enables you to connect to many of these services.
Configuration Parameters¶
You will need to provide values for the following parameters when you create an AWS service interface:
- Stitch UI
- Import/Export
Parameter | Description |
---|---|
Service Name config.name
|
A unique name for the service. |
Access Key ID config.accessKeyId
|
The access key ID for an AWS IAM user. The user should have programmatic access and appropriate permissions for all AWS services that you plan to interact with. |
Secret Access Key secret_config.secretAccessKey
|
The name of a Secret that stores a secret access key for the IAM user whose ID is specified in Access Key ID. You can find this value next to the Access key ID when you create a new IAM user or create a new access key for an existing IAM user. |
Service Actions¶
Each AWS service has different actions that you can perform on that service. Stitch uses the action names specified in the AWS SDK for Go for each service.
Note
Stitch uses the same names (and casing) for the AWS services and actions as the AWS Go SDK.
For each supported AWS service, Stitch supports any action that:
- Takes a single input parameter.
- Returns one of two objects: an output object, or an error.
For example, the S3
service includes a PutObject
action. Stitch supports this action because it takes a single
input type of PutObjectInput, and returns
either a PutObjectOutput or an error.
AWS Service Rules¶
You must specify rules to enable the AWS services and actions. Each rule
applies to a single service API, plus one or all actions on that service.
As with other service rules in Stitch, a rule must evaluate
to true
to enable the action.
For example, the following rule enables all actions on the Kinesis service:

Note
The default value of the When
field contains only empty brackets, which means the rule will always
evaluate to true
, and therefore all calls to the action are valid.
This rule can also be expressed as the following JSON expression. Note that in the array of actions
, the asterisk
(*
) after the service name indicates that all actions of that
service are enabled:
Rule Conditions¶
For each service action, the rule you create may include any of the
properties of the input object for that action as a condition for
validating the rule. The %%args
expansion provides access to these
properties.
Example¶
S3 PutObject
¶
The S3
service includes the PutObject
action, which takes an input object of type of PutObjectInput. You can reference any of the properties on the
PutObjectInput
object in a rule’s When expression with the
%%args
expansion.
Using the Bucket
property of the PutObjectInput
object, you can
create a rule that enables the PutObject
action on the S3 service,
but restricts the action to a list of approved buckets. In this example,
we use a user-defined constant called myS3Buckets
for the list of approved
bucket names:

This can also be expressed as the following JSON:
S3 GetObject
¶
The S3
service includes the GetObject
action, which takes an input object of type of GetObjectInput. You can reference any of the properties on the
GetObjectInput
object in a rule’s When expression with the
%%args
expansion.
In the following example, we create a rule that enables the GetObject
action on a specific bucket called stitchReadWritableBucket
:

This can also be expressed as the following JSON:
Usage¶
You can call an AWS service from a Stitch function and from the SDKs. The following sections show each of these processes.
Call an AWS Service from a Stitch Function¶
The following examples show how to call various AWS services from within a Stitch function. In each example, it is assumed the named service has already been created.
S3 Service¶
S3 PutObject
¶
S3 GetObject
¶
S3 PresignURL
¶
Refer to the S3 API Reference for implementation details.
Object Size Limitation
Stitch supports a maximum file size of 4 Megabytes when working with AWS S3 objects.
Kinesis Service¶
Refer to the Kinesis API Reference for implementation details.
Lambda Service¶
Refer to the Lambda API Reference for implementation details.
SES Service¶
Refer to the SES API Reference for implementation details.
Calling an AWS Service from the SDKs¶
The following example shows how to configure and call an AWS service (S3
in this case) using the AwsServiceClient
factory in each SDK.
- JavaScript SDK
- Android SDK
- iOS SDK
Supported AWS Services¶
Your Stitch app can connect to the following AWS services:
- Athena
- Batch
- CloudWatch
- Comprehend
- EC2
- Firehose
- Glacier
- IOT
- Kinesis
- Lambda
- Lex Runtime Service
- Machine Learning
- Mobile Analytics
- Polly
- RDS
- Redshift
- Rekognition
- S3
- SES
- Step Functions (SFN)
- SNS
- SQS
- Textract