AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/servicecontrol/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Amazon S3 Message Body Storage

Component:
ServiceControl

Amazon S3 storage saves message bodies in an S3 bucket. Set ServiceControl/MessageBody/StorageType on an Error instance, or ServiceControl.Audit/MessageBody/StorageType on an Audit instance, to S3 when the instance uses SQL Server or PostgreSQL storage.

Authentication

Amazon S3 supports two authentication methods:

  • Static keys — configure AccessKeyId and SecretAccessKey together. Both must be set or both must be left empty.
  • Ambient credentials — when static keys are not set, the AWS SDK default credential chain resolves credentials, such as an IAM role attached to the compute resource.

Required settings

ServiceControl/MessageBody/S3/BucketName

Added in version 7.0.0

The Amazon S3 bucket used to store message bodies when MessageBody/StorageType is S3.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_BUCKETNAME
App config keyServiceControl/MessageBody/S3/BucketName
SCMU fieldN/A
TypeDefault value
stringNone (required for S3 storage)

ServiceControl.Audit/MessageBody/S3/BucketName

Added in version 7.0.0

The Amazon S3 bucket used to store message bodies when MessageBody/StorageType is S3.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_BUCKETNAME
App config keyServiceControl.Audit/MessageBody/S3/BucketName
SCMU fieldN/A
TypeDefault value
stringNone (required for S3 storage)

Optional settings

ServiceControl/MessageBody/S3/KeyPrefix

Added in version 7.0.0

The prefix applied to message body object keys in Amazon S3.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_KEYPREFIX
App config keyServiceControl/MessageBody/S3/KeyPrefix
SCMU fieldN/A
TypeDefault value
stringerror-bodies/

ServiceControl.Audit/MessageBody/S3/KeyPrefix

Added in version 7.0.0

The prefix applied to message body object keys in Amazon S3. Every Audit instance has the same default, so set a different key prefix for each Audit instance that uses the same bucket. The exception is Audit instances that share a database, which must all use the same bucket and key prefix.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_KEYPREFIX
App config keyServiceControl.Audit/MessageBody/S3/KeyPrefix
SCMU fieldN/A
TypeDefault value
stringaudit-bodies/

ServiceControl/MessageBody/S3/Region

Added in version 7.0.0

The AWS region containing the S3 bucket. When this setting is not specified, the AWS SDK resolves the region from its default configuration chain.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_REGION
App config keyServiceControl/MessageBody/S3/Region
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/S3/Region

Added in version 7.0.0

The AWS region containing the S3 bucket. When this setting is not specified, the AWS SDK resolves the region from its default configuration chain.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_REGION
App config keyServiceControl.Audit/MessageBody/S3/Region
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl/MessageBody/S3/ServiceUrl

Added in version 7.0.0

The service URL for an S3-compatible storage provider. Leave this setting empty when using Amazon S3.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_SERVICEURL
App config keyServiceControl/MessageBody/S3/ServiceUrl
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/S3/ServiceUrl

Added in version 7.0.0

The service URL for an S3-compatible storage provider. Leave this setting empty when using Amazon S3.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_SERVICEURL
App config keyServiceControl.Audit/MessageBody/S3/ServiceUrl
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl/MessageBody/S3/AccessKeyId

Added in version 7.0.0

The access key ID used to authenticate with S3. Configure this setting together with ServiceControl/MessageBody/S3/SecretAccessKey, or leave both empty to use the AWS SDK default credential chain.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_ACCESSKEYID
App config keyServiceControl/MessageBody/S3/AccessKeyId
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/S3/AccessKeyId

Added in version 7.0.0

The access key ID used to authenticate with S3. Configure this setting together with ServiceControl.Audit/MessageBody/S3/SecretAccessKey, or leave both empty to use the AWS SDK default credential chain.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_ACCESSKEYID
App config keyServiceControl.Audit/MessageBody/S3/AccessKeyId
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl/MessageBody/S3/SecretAccessKey

Added in version 7.0.0

The secret access key used to authenticate with S3. Configure this setting together with ServiceControl/MessageBody/S3/AccessKeyId, or leave both empty to use the AWS SDK default credential chain.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_S3_SECRETACCESSKEY
App config keyServiceControl/MessageBody/S3/SecretAccessKey
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/S3/SecretAccessKey

Added in version 7.0.0

The secret access key used to authenticate with S3. Configure this setting together with ServiceControl.Audit/MessageBody/S3/AccessKeyId, or leave both empty to use the AWS SDK default credential chain.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_S3_SECRETACCESSKEY
App config keyServiceControl.Audit/MessageBody/S3/SecretAccessKey
SCMU fieldN/A
TypeDefault value
stringNone

Setup and runtime

Setup creates the configured bucket if it does not exist. To check for the bucket, setup reads the bucket's access control list, so the identity used for setup needs s3:GetBucketAcl and, to create the bucket, s3:CreateBucket. If setup cannot read the access control list, it assumes the bucket exists and does not create it; create the bucket in advance when the setup identity lacks these permissions.

The runtime identity needs s3:GetObject, s3:PutObject, and s3:DeleteObject on objects in the bucket, and s3:ListBucket on the bucket itself. The retention sweeper deletes body objects before removing the corresponding database records.

For S3-compatible storage, set ServiceUrl to the endpoint URL. ServiceControl uses path-style addressing when a service URL is configured. Leave ServiceUrl unset when using Amazon S3.

Set these variables in the instance's environment to use static keys. Replace the credential placeholders with secrets supplied by the deployment environment:

SERVICECONTROL_MESSAGEBODY_STORAGETYPE=S3
SERVICECONTROL_MESSAGEBODY_S3_BUCKETNAME=servicecontrol-bodies
SERVICECONTROL_MESSAGEBODY_S3_ACCESSKEYID=...
SERVICECONTROL_MESSAGEBODY_S3_SECRETACCESSKEY=...
SERVICECONTROL_MESSAGEBODY_S3_REGION=us-east-1

Example environment variables using ambient credentials:

SERVICECONTROL_MESSAGEBODY_STORAGETYPE=S3
SERVICECONTROL_MESSAGEBODY_S3_BUCKETNAME=servicecontrol-bodies
SERVICECONTROL_MESSAGEBODY_S3_REGION=us-east-1

Audit instances use the same settings with the SERVICECONTROL_AUDIT_ prefix. Set a key prefix for each Audit instance that uses the same bucket, except Audit instances that share a database:

SERVICECONTROL_AUDIT_MESSAGEBODY_STORAGETYPE=S3
SERVICECONTROL_AUDIT_MESSAGEBODY_S3_BUCKETNAME=servicecontrol-bodies
SERVICECONTROL_AUDIT_MESSAGEBODY_S3_KEYPREFIX=audit-instance1/
SERVICECONTROL_AUDIT_MESSAGEBODY_S3_REGION=us-east-1

See the external message body storage overview for shared configuration, retention, and backup guidance.