The Amazon S3 resource allows you to create, configure, and manage your S3 integration. In this integration, Immuta provides coarse-grained access controls for data in S3 by performing permission grants using the Access Grants API so that users don't have to manage individual IAM policies themselves.
Use the /integrations endpoint to
S3 integration enabled in Immuta; contact your Immuta representative to enable this integration
; contact your Immuta representative to get this feature enabled
No location is registered in your AWS Access Grants instance before configuring the integration in Immuta
APPLICATION_ADMIN Immuta permission to configure the integration
CREATE_S3_DATASOURCE Immuta permission to register S3 prefixes
There are two AWS roles that you will set up in AWS before configuring the integration in Immuta:
. AWS supports one Access Grants instance per region per AWS account.
Create a permissions policy with the following permissions. You will attach this permissions policy to your location IAM role once created.
If you use server-side encryption with AWS Key Management Service (AWS KMS) keys to encrypt your data, the following permissions are required for the IAM role in the policy. If you do not use this feature, do not include these permissions in your IAM policy:
kms:Decrypt
role and select AWS account as the trusted entity type.
Edit the trust policy to give the S3 Access Grants service principal access to this role in the resource policy file. The trust policy for this role should include at least the permissions provided in the example below, but might need additional permissions depending on other local setup factors.
Attach the permissions policy you created in the previous step to this IAM role to grant the permissions to the role. Once you begin configuring the integration in Immuta, you will add this role to your integration configuration so that Immuta can register this role with your Access Grants location.
Create a permissions policy with the permissions in the sample policy below.
Replace <location_role_arn> and <access_grants_instance_arn> in the example below with the ARNs of the location IAM role you created and your Access Grants instance, respectively. The Access Grants instance resource ARN should be scoped to apply to any future locations that will be created under this Access Grants instance. For example, "Resource": "arn:aws:s3:us-east-2:6********499:access-grants/default*" ensures that the role would have permissions for both of these locations:
arn:aws:s3:us-east-2:6********499:access-grants/default/newlocation1
This request configures the integration using the AWS access key authentication method.
Copy the request example. The example uses JSON format, but the request also accepts YAML.
Replace the Immuta URL and with your own.
Change the config values to your own, where
See the for parameter definitions, value types, and additional configuration options.
The response returns the status of the S3 integration configuration connection. See the for details about the response schema.
A successful response includes the validation tests statuses.
An unsuccessful request returns the status code and an error message. See the for a list of statuses, error messages, and troubleshooting guidance.
Copy the request example.
Replace the Immuta URL and with your own.
Replace the {id} request parameter with the unique identifier of the integration you want to get. Alternatively, you can get a list of all integrations and their IDs with the .
The response returns an S3 integration configuration. See the for details about the response schema. An unsuccessful response returns the status code and an error message. See the for a list of statuses, error messages, and troubleshooting guidance.
Copy the request example.
Replace the Immuta URL and with your own.
The response returns the configuration for all integrations. See the for details about the response schema. An unsuccessful request returns the status code and an error message. See the for a list of statuses, error messages, and troubleshooting guidance.
Copy the request example, and replace the values with your own as directed to update the integration settings. The example provided uses JSON format, but the request also accepts YAML.
See the for parameter definitions, value types, and additional configuration options.
Replace the Immuta URL and with your own.
Replace the {id} request parameter with the unique identifier of the integration you want to update.
Change the config values from above to your own. The editable values listed below are the only parameters that can change from the integration's existing configuration. The required parameters listed below must match the integration's existing configuration.
The response returns the status of the Amazon S3 integration configuration connection. See the for details about the response schema.
A successful response includes the validation tests statuses.
An unsuccessful request returns the status code and an error message. See the for a list of statuses, error messages, and troubleshooting guidance.
Copy the request example.
Replace the Immuta URL and with your own.
Replace the {id} request parameter with the unique identifier of the integration you want to delete.
The response returns the status of the S3 integration configuration that has been deleted. See the for details about the response schema. An unsuccessful request returns the status code and an error message. See the for a list of statuses, error messages, and troubleshooting guidance.
Authentication IAM role (or user): Immuta uses this role to authenticate with AWS, set up the integration, and issue grants. This entity must
have the permissions to perform the following actions to create locations and issue grants:
accessgrantslocation resource:
s3:CreateAccessGrant
s3:DeleteAccessGrantsLocation
s3:GetAccessGrantsLocation
accessgrantsinstance resource:
s3:CreateAccessGrantsInstance
s3:CreateAccessGrantsLocation
s3:DeleteAccessGrantsInstance
accessgrant resource:
s3:DeleteAccessGrant
s3:GetAccessGrant
bucket resource: s3:ListBucket
role resource:
iam:GetRole
iam:PassRole
all resources: s3:ListAccessGrantsInstances
kms:GenerateDataKey
Replace <bucket_arn> in the example below with the ARN of the bucket scope that contains data you want to grant access to.
arn:aws:s3:us-east-2:6********499:access-grants/default/newlocation2If you use AWS IAM Identity Center, associate your IAM Identity Center instance with your S3 Access Grants instance. Then add the permissions listed in the sample policy below to your IAM authentication policy.
Copy the JSON below and replace the following bracketed placeholder values with your own. For details about the actions and resource values, see the IAM Identity Center API reference documentation.
<iam_identity_center_instance_arn>: The ARN of the instance of IAM Identity Center (InstanceArn) that is configured with the application.
<iam_identity_center_application_arn_for_s3_access_grants>: The ARN of the S3 Access Grants instance (ApplicationArn) configured with IAM Identity Center.
<aws_account>: Your AWS account ID.
<identity_store_id>: The globally that is connected to the Identity Center instance. This value is generated when a new identity store is created.
Create an AWS IAM role (recommended) and select AWS account as the trusted entity type.
Attach the permissions policy you created in the previous step to the authentication IAM role to grant the permissions to the role. Once you begin configuring the integration in Immuta, you will add this role to your integration configuration so that Immuta can authenticate with AWS and set up the integration.
name is the name for the integration that is unique across all Amazon S3 integrations configured in Immuta.
awsAccountId is the ID of your AWS account.
awsRegion is the account's AWS region (such as us-east-1).
awsLocationRole is the AWS IAM role ARN assigned to the base access grants location. This is the role the AWS Access Grants service assumes to vend credentials to the grantee.
awsLocationPath is the base S3 location prefix that Immuta will use for this connection when registering S3 data sources. This path must be unique across all S3 integrations configured in Immuta.
awsAccessKeyId is the AWS access key ID of the AWS account configuring the integration.
awsSecretAccessKey is the AWS secret access key of the AWS account configuring the integration.
This request configures the integration using the automatic authentication method, which searches and obtains credentials using the AWS SDK's default credential provider chain. This method requires a configured IAM role for a service account and is only supported if you're using a self-managed deployment of Immuta. Contact your Immuta representative to customize your deployment and set up an IAM role for a service account that can give Immuta the credentials to set up the integration. Your Immuta representative will
Provide the AWS account to add to your trust policy.
Update the Immuta AWS configuration to allow Immuta to assume the role of your service principal.
Then, complete the steps below.
Copy the request example. The example uses JSON format, but the request also accepts YAML.
Replace the Immuta URL and with your own.
Change the config values to your own, where
name is the name for the integration that is unique across all Amazon S3 integrations configured in Immuta.
awsAccountId is the ID of your AWS account.
awsRegion is the account's AWS region (such as us-east-1
name is the name for the integration that is unique across all Amazon S3 integrations configured in Immuta.
authenticationType is the method used to authenticate with AWS when configuring the S3 integration (accepted values are auto or accessKey).
awsAccessKeyId is the AWS access key ID for the AWS account editing the integration.
awsSecretAccessKey is the AWS secret access key for the AWS account editing the integration.
required values from existing configuration:
awsRoleToAssume is the optional AWS IAM role ARN Immuta assumes when interacting with AWS.
awsAccountId is the ID of your AWS account.
awsRegion is the account's AWS region (such as us-east-1).
awsLocationRole is the AWS IAM role ARN assigned to the base access grants location. This is the role the AWS Access Grants service assumes to vend credentials to the grantee.
awsLocationPath is the base S3 location that Immuta will use for this connection when registering S3 data sources. This path must be unique across all S3 integrations configured in Immuta.
curl -X 'POST' \
'https://<your-immuta-url.com>/integrations' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>' \
-d '{
"type": "Native S3",
"autoBootstrap": false,
"config": {
"name": "<name-of-your-integration>",
"awsAccountId": "<your-aws-account-id>",
"awsRegion": "<your-aws-region>",
"awsLocationRole": "<arn:aws:iam::your-location-role-arn:role/access-grants-instance-role>",
"awsLocationPath": "<your-s3-location-path>",
"authenticationType": "auto"
}
}'{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1234567891011",
"Effect": "Allow",
"Principal": {
"Service":"access-grants.s3.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"sts:SetSourceIdentity"
]
}
]
} curl -X 'POST' \
'https://<your-immuta-url.com>/integrations' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>' \
-d '{
"type": "Native S3",
"autoBootstrap": false,
"config": {
"name": "<name-of-your-integration>",
"awsAccountId": "<your-aws-account-id>",
"awsRegion": "<your-aws-region>",
"awsLocationRole": "<arn:aws:iam::your-location-role-arn:role/access-grants-instance-role>",
"awsLocationPath": "<your-s3-location-path>",
"authenticationType": "accessKey",
"awsAccessKeyId": "<your-access-key-id>",
"awsSecretAccessKey": "<your-secret-access-key>"
}
}'{
"id": "123456789",
"status": "creating",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "There is no existing integration matching this configuration",
"status": "passed"
},
{
"name": "The provided integration name is unique across Immuta S3 integrations",
"status": "passed"
},
{
"name": "The provided access grants location role is a valid ARN format",
"status": "passed"
},
{
"name": "The provided AWS credentials allow fetching the caller's identity via the AWS STS API",
"status": "passed"
},
{
"name": "An AWS Access Grants instance is configured in the provided AWS account and region",
"status": "passed"
},
{
"name": "The provided S3 path exists and Immuta can list prefixes",
"status": "passed"
},
{
"name": "An AWS Access Grants location does not yet exist for the provided path",
"status": "passed"
}
]
}
}{
"statusCode": 409,
"error": "Conflict",
"message": "Access Grants location already exists on provided path."
}curl -X 'GET' \
'https://<your-immuta-url.com>/integrations/{id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>'{
"id": "123456789",
"status": "enabled",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "There is no existing integration matching this configuration",
"status": "passed"
},
{
"name": "The provided integration name is unique across Immuta S3 integrations",
"status": "passed"
},
{
"name": "The provided access grants location role is a valid ARN format",
"status": "passed"
},
{
"name": "The provided AWS credentials allow fetching the caller's identity via the AWS STS API",
"status": "passed"
},
{
"name": "An AWS Access Grants instance is configured in the provided AWS account and region",
"status": "passed"
},
{
"name": "The provided S3 path exists and Immuta can list prefixes",
"status": "passed"
},
{
"name": "An AWS Access Grants location does not yet exist for the provided path",
"status": "passed"
}
]
},
"type": "Native S3",
"autoBootstrap": false,
"config": {
"port": 443,
"name": "S3 integration",
"awsAccountId": "123456789",
"awsRegion": "us-east-1",
"awsLocationRole": "arn:aws:iam::123456789:role/access-grants-instance-role",
"awsLocationPath": "s3://",
"authenticationType": "accessKey",
"awsAccessKeyId": "123456789",
"awsSecretAccessKey": "123456789"
}
}curl -X 'GET' \
'https://<your-immuta-url.com>/integrations' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>'[
{
"id": "1",
"status": "enabled",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "Initial Validation: Basic Connection Test",
"status": "passed"
},
{
"name": "Initial Validation: Default Warehouse Access Test",
"status": "passed",
"result": []
},
{
"name": "Initial Validation: Validate access to Privileged Role",
"status": "passed",
"result": []
},
{
"name": "Validate Automatic: Database Does Not Exist",
"status": "passed"
},
{
"name": "Validate Automatic: Impersonation Role Does Not Exist",
"status": "skipped"
},
{
"name": "Validate Automatic Bootstrap User Grants",
"status": "passed"
}
] },
"type": "Snowflake",
"autoBootstrap": true,
"config": {
"host": "organization.us-east-1.snowflakecomputing.com",
"warehouse": "SAMPLE_WAREHOUSE",
"database": "SNOWFLAKE_SAMPLE_DATA",
"port": 443,
"audit": {
"enabled": false
},
"workspaces": {
"enabled": false
},
"impersonation": {
"enabled": false
},
"lineage": {
"enabled": false
},
"authenticationType": "userPassword",
"username": "<REDACTED>",
"password": "<REDACTED>",
"role": "ACCOUNTADMIN"
}
},
{
"id": "123456789",
"status": "enabled",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "There is no existing integration matching this configuration",
"status": "passed"
},
{
"name": "The provided integration name is unique across Immuta S3 integrations",
"status": "passed"
},
{
"name": "The provided access grants location role is a valid ARN format",
"status": "passed"
},
{
"name": "The provided AWS credentials allow fetching the caller's identity via the AWS STS API",
"status": "passed"
},
{
"name": "An AWS Access Grants instance is configured in the provided AWS account and region",
"status": "passed"
},
{
"name": "The provided S3 path exists and Immuta can list prefixes",
"status": "passed"
},
{
"name": "An AWS Access Grants location does not yet exist for the provided path",
"status": "passed"
}
] },
"type": "Native S3",
"autoBootstrap": false,
"config": {
"port": 443,
"name": "S3 integration",
"awsAccountId": "123456789",
"awsRegion": "us-east-1",
"awsLocationRole": "arn:aws:iam::123456789:role/access-grants-instance-role",
"awsLocationPath": "s3://",
"authenticationType": "accessKey",
"awsAccessKeyId": "123456789",
"awsSecretAccessKey": "123456789"
}
}
]curl -X 'PUT' \
'https://<your-immuta-url.com>/integrations/{id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>' \
-d '{
"type": "Native S3",
"autoBootstrap": false,
"config": {
"name": "<your-edited-integration-name>",
"awsAccountId": "<your-aws-account-id>",
"awsRegion": "<your-aws-region>",
"awsLocationRole": "<arn:aws:iam::your-location-role-arn:role/access-grants-instance-role>",
"awsLocationPath": "<your-s3-location-path>",
"authenticationType": "<accessKey-or-auto>",
"awsAccessKeyId": "<your-aws-access-key-id>",
"awsSecretAccessKey": "<your-secret-access-key>"
}
}'{
"id": "123456789",
"status": "editing",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "There is no existing integration matching this configuration",
"status": "passed"
},
{
"name": "The provided integration name is unique across Immuta S3 integrations",
"status": "passed"
},
{
"name": "The provided access grants location role is a valid ARN format",
"status": "passed"
},
{
"name": "The provided AWS credentials allow fetching the caller's identity via the AWS STS API",
"status": "passed"
},
{
"name": "An AWS Access Grants instance is configured in the provided AWS account and region",
"status": "passed"
},
{
"name": "The provided S3 path exists and Immuta can list prefixes",
"status": "passed"
},
{
"name": "An AWS Access Grants location does not yet exist for the provided path",
"status": "passed"
}
]
}
}{
"statusCode": 409,
"error": "Conflict",
"message": "Unable to edit integration with ID 123456789 in current state editing."
}curl -X 'DELETE' \
'https://<your-immuta-url.com>/integrations/{id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-api-key>'{
"id": "123456789",
"status": "deleting",
"validationResults": {
"status": "passed",
"validationTests": [
{
"name": "The provided access grants location role is a valid ARN format",
"status": "passed"
},
{
"name": "The provided AWS credentials allow fetching the caller's identity via the AWS STS API",
"status": "passed"
},
{
"name": "An AWS Access Grants instance is configured in the provided AWS account and region",
"status": "passed"
},
{
"name": "The provided S3 path exists and Immuta can list prefixes",
"status": "passed"
}
]
}
}{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ObjectLevelReadPermissions",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion",
"s3:GetObjectAcl",
"s3:GetObjectVersionAcl",
"s3:ListMultipartUploadParts"
],
"Resource": [
<bucket arn>
]
},
{
"Sid": "ObjectLevelWritePermissions",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutObjectVersionAcl",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:AbortMultipartUpload"
],
"Resource": [
<bucket arn>
]
},
{
"Sid": "BucketLevelReadPermissions",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:ListBucket"
],
"Resource": [
<bucket arn>
]
}
]
}{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RolePermissions",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PassRole"
],
"Resource": "<location_role_arn>"
},
{
"Sid": "AccessGrants",
"Effect": "Allow",
"Action": [
"s3:CreateAccessGrant",
"s3:DeleteAccessGrantsLocation",
"s3:GetAccessGrantsLocation",
"s3:CreateAccessGrantsLocation",
"s3:GetAccessGrantsInstance",
"s3:GetAccessGrantsInstanceForPrefix",
"s3:GetAccessGrantsInstanceResourcePolicy",
"s3:ListAccessGrants",
"s3:ListAccessGrantsLocations",
"s3:ListAccessGrantsInstances",
"s3:DeleteAccessGrant",
"s3:GetAccessGrant"
],
"Resource": [
"<access_grants_instance_arn>"
]
}
]
}s3:UpdateAccessGrantsLocations3:GetAccessGrantsInstance
s3:GetAccessGrantsInstanceForPrefix
s3:GetAccessGrantsInstanceResourcePolicy
s3:ListAccessGrants
s3:ListAccessGrantsLocations
awsLocationRole is the AWS IAM role ARN assigned to the base access grants location. This is the role the AWS Access Grants service assumes to vend credentials to the grantee.
awsLocationPath is the base S3 location that Immuta will use for this connection when registering S3 data sources. This path must be unique across all S3 integrations configured in Immuta.
{
"Sid": "sso",
"Effect": "Allow",
"Action": [
"sso:DescribeInstance",
"sso:DescribeApplication",
"sso-directory:DescribeUsers"
],
"Resource": [
"<iam_identity_center_instance_arn>",
"<iam_identity_center_application_arn_for_s3_access_grants>",
"arn:aws:identitystore:::user/*",
"arn:aws:identitystore::<aws_account>:identitystore/<identity_store_id>"
]
}, {
"Sid": "idc",
"Effect": "Allow",
"Action": [
"identitystore:DescribeUser",
"identitystore:DescribeGroup"
],
"Resource": [
"<iam_identity_center_instance_arn>",
"<iam_identity_center_application_arn_for_s3_access_grants>",
"arn:aws:identitystore:::user/*",
"arn:aws:identitystore::<aws_account>:identitystore/<identity_store_id>"
]
}