Setup Guide
This guide walks you through setting up your AWS account and obtaining the credentials required to use the AWS SimpleDB connector.
Prerequisites
- An active AWS account with access to one of the regions where Amazon SimpleDB is available
- Permissions to create IAM users and attach IAM policies in the AWS Management Console
Step 1: Create an IAM user
-
Log in to the AWS Management Console.
-
Navigate to IAM (Identity and Access Management).
-
Select Users in the left sidebar, then select Create user.
-
Enter a user name (for example,
ballerina-simpledb-connector) and select Next. -
Select Attach policies directly.
-
Select Create policy, open the JSON tab, and paste the policy below, then attach it. Replace
<REGION>,<ACCOUNT_ID>, and<DOMAIN_NAME>with the values for your deployment, or usedomain/*to grant access to every domain in the account.{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sdb:ListDomains",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"sdb:CreateDomain",
"sdb:DomainMetadata",
"sdb:DeleteDomain",
"sdb:GetAttributes",
"sdb:PutAttributes",
"sdb:DeleteAttributes",
"sdb:Select"
],
"Resource": "arn:aws:sdb:<REGION>:<ACCOUNT_ID>:domain/<DOMAIN_NAME>"
}
]
}sdb:ListDomainsoperates across the account and takes no domain resource, so it stays in its own statement scoped to*. Every other action, includingCreateDomain, is scoped to the domain ARN. -
Select Next, review the settings, and select Create user.
For a screenshot-by-screenshot walkthrough of the IAM user creation and access key generation steps, see the AWS SQS setup guide. The console flow is identical, only the attached policy differs.
For production workloads, consider using an IAM role with temporary credentials via AWS STS instead of long-lived access keys.
Step 2: Generate access keys
- In the IAM console, select the user you created.
- Go to the Security credentials tab.
- Under Access keys, select Create access key.
- Select the Application running outside AWS use case and select Next.
- Optionally add a description tag, then select Create access key.
- Copy the Access key ID and Secret access key.
The secret access key is shown only once at creation time. Store it securely and do not commit it to source control. Use Ballerina's configurable feature and a Config.toml file to supply credentials at runtime.
Step 3: Identify your AWS region
Determine the AWS region that hosts your SimpleDB domains. Amazon SimpleDB is a legacy service with no AWS Management Console UI, and it is available in only these eight regions:
| Region | Endpoint |
|---|---|
us-east-1 | sdb.amazonaws.com |
us-west-1 | sdb.us-west-1.amazonaws.com |
us-west-2 | sdb.us-west-2.amazonaws.com |
eu-west-1 | sdb.eu-west-1.amazonaws.com |
ap-southeast-1 | sdb.ap-southeast-1.amazonaws.com |
ap-southeast-2 | sdb.ap-southeast-2.amazonaws.com |
ap-northeast-1 | sdb.ap-northeast-1.amazonaws.com |
sa-east-1 | sdb.sa-east-1.amazonaws.com |
The us-east-1 region uses the region-less sdb.amazonaws.com host; the connector resolves this automatically. For new applications, AWS recommends Amazon DynamoDB instead of SimpleDB.
Next steps
- Action Reference - Available operations