Experience data sources
ReSim supports multiple sources for experience data. This page describes how to configure access for each supported source.
AWS S3
You can use an existing bucket where you already have input data, or create a new one for ReSim.
If you create a new bucket, we recommend creating it in the us-east-1 region as that's where our app runs. You can
follow the AWS documentation for creating a
bucket. We don't require any
specific settings except that the data isn't stored in Glacier
archive.
Whether you have an existing bucket, or have created one specifically for use with ReSim, you need to give a ReSim IAM role access to read from the bucket. As described in IAM Roles, the IAM role to which you need to grant access will either be a generic role or a customer-specific role.
The IAM role is used by components of the ReSim platform if they need to fetch Experience data. The generic role is:
arn:aws:iam::083585393365:role/resim-customer-prod
New bucket, or bucket without existing policy
The following policy needs to be applied to your bucket. Make sure you replace the bucket-name placeholder value with
the name of your bucket. Also check whether you are using a generic role or a customer-specific role as described above.
{
"Version": "2012-10-17",
"Id": "ReSimAccess",
"Statement": [
{
"Sid": "ReSimAccess",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::083585393365:role/resim-customer-prod"
},
"Action": ["s3:GetObject", "s3:ListBucket"],
"Resource": ["arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*"]
}
]
}
Existing bucket with policy
If your bucket already has a bucket policy set, update the policy to add the following statement. Make sure you replace
the bucket-name placeholder value with the name of your bucket. Also check whether you are using a generic role or a customer-specific role as described above.
"Statement": [
{
"Sid": "ReSimAccess",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::083585393365:role/resim-customer-prod"
},
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bucket-name",
"arn:aws:s3:::bucket-name/*"
]
}
]
Using S3 experiences
When creating experiences, use the s3:// prefix for your location:
resim experiences create \
--project "my-project" \
--name "My S3 Experience" \
--locations "s3://my-bucket/path/to/experience/"
Important
Any location that points to an S3 bucket must be prefixed with s3:// rather than the https://... form.
Google Cloud Storage
You can use an existing GCS bucket or create a new one for ReSim. If creating a new bucket, we recommend using the
us-east1 region for optimal performance.
Setting up access
To grant ReSim access to your GCS bucket, you need to create a service account and share its credentials with us.
-
Create a service account following the Google Cloud documentation.
-
Grant the service account read access to your bucket. The service account needs the
Storage Object Viewerrole on the bucket containing your experiences. -
Generate a key for the service account following the Google Cloud documentation.
-
Share the key with ReSim. Provide the contents of the
key.jsonfile to your ReSim contact. We will configure secure storage and automated use of your credentials.
Using GCS experiences
When creating experiences, use the gs:// prefix for your location:
resim experiences create \
--project "my-project" \
--name "My GCS Experience" \
--locations "gs://my-gcs-bucket/path/to/experience/"
Foxglove Data Platform
ReSim integrates with the Foxglove Data Platform, allowing you to use recordings stored in Foxglove as experience data for your tests.
Setting up access
Foxglove access is configured per ReSim project using an API key.
-
Generate an API key in your Foxglove organization settings. Navigate to your Foxglove settings and create a new API key with read access to the recordings you want to use.
-
Share the API key with ReSim. Provide the API key to your ReSim contact along with the ReSim project you want to associate it with. We will configure secure storage and automated use of your credentials.
One API key per project
Each ReSim project can have one Foxglove API key associated with it. If you need to access recordings from multiple Foxglove organizations, please contact us to discuss your requirements.
Using Foxglove experiences
When creating experiences, use the foxglove:// prefix with the recording ID:
resim experiences create \
--project "my-project" \
--name "My Foxglove Experience" \
--locations "foxglove://rec_abc123def456"
You can find the recording ID in the Foxglove web app when viewing a recording.
Local Experiences
Experience data can also be stored locally within your build container. This is useful when experience data is tightly coupled to changes in your system and lives in the same repository.
Providing access to local experiences in your container
In your experience build Dockerfile, copy the files from your repository to your container:
COPY <path>/<to>/<experience>/<in>/<repo> /experiences/
Creating local experiences
When creating a local experience, provide the path where the data will be located inside the container:
resim experiences create \
--project "my-project" \
--name "My Local Experience" \
--locations "/experiences/my-scenario/"
Programmatically accessing local experiences
For local experiences, ReSim does not perform any automatic file copying. Instead, the /tmp/resim/test_config.json
file will contain an experienceLocation field that you can use to locate the experience data:
import json
# Read the test_config.json file
try:
with open("/tmp/resim/test_config.json", "r") as f:
test_config = json.load(f)
except FileNotFoundError:
raise FileNotFoundError("test_config.json not found in /tmp/resim")
# Get the experience location
experience_location = test_config["experienceLocation"]
Cloud vs Local experiences
For cloud-based experiences (S3, GCS, Foxglove), ReSim automatically copies the experience files into
/tmp/resim/inputs/ before your build runs. For local experiences, files remain at their original location and you
must access them directly using the path from test_config.json.