Amazon Web Services¶
Amazon Web Services (AWS) offer a variety of cloud-based services, including computing, storage, databases, and more. Unlike many other services, AWS products often go beyond data, providing additional functionality for end users. Through Skuid’s DSTs, you can utilize this additional functionality within your Skuid pages.
Note
The AWS data source types are currently exclusive to Skuid NLX.
Configure an Amazon Authentication Provider¶
Before configuring data sources within Skuid, you need to decide how you’ll authenticate to your AWS services using an IAM role. We recommend consulting your AWS administrator prior to making this decision.
Assume Role [[]]
This authentication method allows you to use the ARN of an assumable role instead of hard-coded AWS access keys. When a Skuid user makes a request using this authentication method, Skuid makes a secure server-side request to assume the configured role. If this request is successful, Skuid receives temporary access credentials, which Skuid caches until the credentials expire after 60 minutes.
Requests made through an assumed role are traceable via the AWS console. From there, you can see both the Skuid site and Skuid user who initiated the request, which provides AWS administrators full visibility into who requested access credentials and from what Skuid site.
Due to this method’s security and ease-of-management after initial setup, we typically recommend it over the access keys method. However, it does require some technical knowledge to configure. Be sure to read all of the instructions below.
Before you begin
Skuid can only access roles that have a defined path containing the string
/skuid-assumable-role/
. This is different from the role’s name. Role paths can only be set when first created, so it isn’t possible to update an existing role with a new path.In order to create a role with a path, you’ll need to use either the AWS IAM API or the AWS CLI.
The instructions below assume you are using AWS CLI (version 2) and that you’ve already configured an access key ID and secret access key for use with the CLI. Ensure these credentials have the
iam:CreateRole
permission. Command line examples are also tailored for Linux or macOS operating systems; commands for command line programs on Windows may differ.Finally, because IAM roles require a trust relationship policy upon creation, you’ll need to save the JSON that Skuid provides when creating an authentication provider. Because of this you’ll need to navigate between your browser window, your computer’s file explorer, as well as the command line.
In Skuid
- From the Skuid navigation bar, navigate to Data Sources > Authentication Providers.
- Click Create.
- Configure the authentication provider’s basic properties:
- Name: Enter a name, such as AWSAuth.
- Authentication Method: AWS: Assume Role with ARN
- In the Trust Relationship Policy, click Copy to Clipboard.
This copied policy will enable your role to grant proper access to your Skuid site.
Note
If you want this role to be assumable by multiple Skuid sites—for example a staging site and a production site, make the
sts:ExternalId property
’s value into an array of Skuid site Ids.For example, change this key/value:
"sts:ExternalId": "09583eba-de0e-49d3-ae42-61b3927a61b1"Into this:
"sts:ExternalId": [ "09583eba-de0e-49d3-ae42-61b3927a61b1", "e354e60f-5a80-4024-b01a-4cae13d0948c" ]Site IDs are accessible from Settings > Site > Profile.
On your local machine
- With the policy copied to your clipboard, paste the policy into a text editor.
- Save the file to an easily accessible directory (for example, your desktop) on your machine with a recognizable name and the JSON file extension, like trust-policy.json
In a command line interface
With the trust policy saved to your machine, you can now use the AWS CLI to create an assumable role.
Open your command line program of choice and navigate to the directory containing your policy JSON file. For example, if you saved the file on your desktop:
1cd ~/Desktop
Use the AWS CLI’s
iam create-role
command to create the role with the proper path value and trust relationship policy:
1 aws iam create-role --role-name Skuid-S3-Access --path /skuid-assumable-role/ --assume-role-policy-document file://trust-policy.jsonNote
While
role-name
can vary from this example, thepath
must contain/skuid-assumable-role/
The CLI creates the role, outputting its ARN and other related metadata. Because of the configured path, your ARN should look similar to this:
arn:aws:iam::1234567891011:role/skuid-assumable-role/Skuid-S3-Access
.Copy this created ARN, either from the command line output or the AWS console.
In Skuid
- Return to the authentication provider window.
- Paste the copied ARN into the AWS Role ARN to assume field.
- Click Save.
Access Keys [[]]
This authentication method utilizes an Amazon Web Service (AWS) IAM role’s access keys to authenticate to an AWS system.
If you are not the manager of your AWS services, follow along with Amazon’s steps for creating access keys with your IT administrator. You’ll need to do the following:
In AWS
- Create a new group and select the appropriate policies for that group.
- These should align with your intended Skuid use. Ensure your access policies match the services (S3, DynamoDB, or SNS) you’ll be using.
- Create a new user in AWS Identity and Access Management (IAM) within the newly created group.
- Retrieve the access credentials generated for that user:
- The secret access key is only displayed once, immediately after the access key is generated, and cannot be found later. Be sure to copy it to a safe place.
In Skuid
With your access credentials handy, you can now use them to configure a Skuid authentication provider that will work with all AWS data sources.
- Navigate to Configure > Data Sources > Authentication Providers.
- Click New Authentication Provider.
- Configure the authentication provider’s basic properties:
- Name: Enter a name, such as AWSAuth.
- Authentication Method: AWS: Access Keys
- Enter your IAM role’s credential information:
- AWS Access Key Id: The access key ID to use when authenticating.
- AWS Secret Access Key: The secret access key to use when authenticating.
- Click Save.
AWS Access Permissions¶
When using AWS APIs, it is best practice to utilize strict and well-defined IAM policies so end users can only perform actions they have explicit access to.
Listed below are the permissions Skuid’s AWS data source types require to properly function. Use this list to better define your IAM roles.
DynamoDB
- dynamodb:DeleteItem
- dynamodb:DescribeTable
- dynamodb:ListTables
- dynamodb:PutItem
- dynamodb:Query
- dynamodb:Scan
- dynamodb:UpdateItem
Lambda
- lambda:InvokeFunction
- lambda:ListFunctions
S3
- s3:DeleteObject
- s3:GetObject
- s3:GetObjectAcl
- s3:ListAllMyBuckets
- s3:ListBucket
- s3:PutObject