Viewing session logs
You can view a session’s logs if you created the session or you’re an Agent Vault admin, for up to 30 days after they’re recorded if Infisical stores them (see Retention).- In Infisical
- Through the API
Go to Sessions and select View Session Logs on the session’s row. You can filter and search the requests, and while the session is active, new requests appear as the proxy uploads them.

What gets recorded
Each request produces one record with:
The outcome is one of four:
Request and response bodies, headers, and query strings aren’t recorded.
Storing session logs in your own S3 bucket
To keep session logs longer than 30 days, or in your own AWS account, store them in an Amazon S3 bucket you own. This is called external storage.External storage is a paid feature.If you’re using Infisical Cloud, it’s available under the Enterprise Tier. If you’re self-hosting Infisical, contact sales@infisical.com to purchase an enterprise license to use it.
Prerequisites
- The Admin role in Agent Vault
- An Amazon S3 bucket to store the records in
- Permission in AWS to edit the bucket’s CORS configuration, create IAM roles, and attach policies to them
Step 1: Start in Infisical
1
In Agent Vault, go to Administration > Settings and select Configure or Set Up Session Logs on the Session Logs card.
2
Turn on Enable, then under Storage, select External storage.
3
Enter the Region and Bucket of your S3 bucket.
4
Optionally, enter a Key Prefix to store session logs under one path in a bucket you also use for other data.
5
Select View AWS Setup. Infisical shows an IAM policy with your bucket and key prefix already filled in, so you can paste it into AWS as it is.
Step 2: Set up in AWS
Add a CORS rule to the bucket
Your browser downloads session logs directly from your bucket, so the bucket has to accept requests from Infisical. Add a CORS rule for Infisical to the bucket.1
In the Amazon S3 console, open the session logs bucket, go to Permissions, and select Edit under Cross-origin resource sharing (CORS).
2
Paste this rule, then select Save changes. If the bucket already has CORS rules, add this rule’s object to the existing array instead of replacing it, so other applications that use the bucket keep working:If you self-host Infisical or use a dedicated instance, replace
AllowedOrigins with your instance’s URL.Create an IAM role for Infisical
If you already have an AWS app connection you want to use, skip to Attach the IAM policy.
If you self-host Infisical
If you self-host Infisical
To assume a role, your Infisical instance needs AWS credentials of its own.If your instance runs on AWS (for example on EC2, ECS, or EKS), leave When you create the role’s trust policy, enter the AWS account ID of this IAM user or instance role, not an Infisical Cloud account ID.
INF_APP_CONNECTION_AWS_ACCESS_KEY_ID and INF_APP_CONNECTION_AWS_SECRET_ACCESS_KEY unset. Infisical then uses the credentials of the instance profile, task role, or IAM role for service accounts (IRSA), and that role needs the sts:AssumeRole policy below.If your instance doesn’t run on AWS, give it an IAM user:1
In the IAM console, create an IAM user for your Infisical instance.
2
Attach this inline policy to the user, so it can assume the roles your connections use:
3
Open the user’s Security credentials tab and create an access key.





4
Set the access key ID as
INF_APP_CONNECTION_AWS_ACCESS_KEY_ID and the secret access key as INF_APP_CONNECTION_AWS_SECRET_ACCESS_KEY in your instance’s environment, then restart the instance.1
In the IAM console, go to Create role. Under Trusted entity type, select AWS account.

2
Select Another AWS account, and enter the AWS account ID that Infisical assumes the role from:
- Infisical Cloud (US):
381492033652 - Infisical Cloud (EU):
345594589636 - Dedicated instance: contact Infisical support for your account ID
- Self-hosted: the account ID of your instance’s credentials (see If you self-host Infisical)
3
Select Next to go to the Add permissions page. Then, select Next again without choosing a policy. You’ll add the permissions as an inline policy after the role exists.
4
Enter a Role name that includes Infisical and what the connection is for, such as
infisical-payments-prod, then select Create role. CloudTrail logs every action Infisical takes under this role’s name, so a descriptive name shows anyone reading the logs where those actions came from.Attach the IAM policy
Attach the IAM policy from Step 1 to the IAM role, or to the role or user your existing connection signs in as.1
In the IAM console, open the role or user. On the Permissions tab, select Add permissions > Create inline policy, switch to the JSON editor, and paste the policy.
2
Select Next, enter a Policy name, then select Create policy.
3
If you created a new role, copy its ARN from the Summary section.

Step 3: Finish in Infisical
Go back to the Session Logs dialog.1
Under AWS Connection, select Create New Connection.
If you already have an AWS app connection you want to use, select it here instead. Then, select Save and skip the remaining steps.
2
Enter a Name, keep the Assume Role (Recommended) method, paste the role’s ARN into Role ARN, and select Connect to AWS. Infisical creates the connection in Agent Vault and selects it.
3
Select Save.

You’ve successfully set up external storage for session logs.
Managing session logs
Turning session logs off
Session logs are on unless an admin turns them off. To stop recording, turn off Enable in the Session Logs dialog and select Save. Turning session logs off also hides the logs already recorded:- With default storage, turning session logs back on shows those logs again, as long as they’re less than 30 days old
- With external storage, Infisical forgets the bucket and its AWS connection (to see the logs again, set up the same bucket and key prefix)
Connections
If you use external storage, session logs use one AWS connection at a time, which you select in the Session Logs dialog. To update the connection’s AWS credentials, open the menu next to Configure on the Session Logs card and select Edit AWS Credentials. If the connection belongs to your organization, update its credentials under Integrations in your organization instead. To add or delete Agent Vault’s AWS connections, select Manage Connections from the same menu:
Changing where session logs are stored
Infisical doesn’t copy existing records when you switch storage or change the bucket or key prefix. Records written before the change don’t show in Infisical until you switch back. If you switch away from default storage, logs already in default storage still expire after 30 days.Retention
How long session logs are kept depends on where they’re stored:- Default storage: you can look back at the last 30 days of session logs, unless your plan sets a different period
- External storage: Infisical never deletes session logs from your bucket (to delete older logs automatically, add an S3 Lifecycle rule to the bucket)