---
schema_version: "1"
id: 7440363eb84023c7ffd79ae01b215050745817a34d5aa3a7b4629975f385dd07
title: AWS Request Signature Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.13/policies-outbound-aws-signature.md
canonical_url: https://docs.mulesoft.com/gateway/1.13/policies-outbound-aws-signature
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 890b92d45fb8bc7bb9e89568c17d228c759ab3132688a8fd268ae5c640b5e9c7
description: MuleSoft Documentation Site
release: "1.13"
latest: false
---
# AWS Request Signature Policy

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Policy Name</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">AWS Request Signature</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Summary</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Signs outgoing requests with AWS Signature Version 4 (SigV4) or Signature Version 4A (SigV4A)</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Category</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Security</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>First Omni Gateway version available</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">v1.11.0</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Release Notes</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://docs.mulesoft.com/release-notes/gateway/policies/outbound-aws-signature-release-notes" class="xref page">AWS Request Signature</a></p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Returned Status Codes</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">No return codes exist for this policy. Error codes are returned from the upstream service.</p></td>
</tr>
</tbody>
</table>

## [](#summary)Summary

The AWS Request Signature policy signs outgoing requests with AWS Signature Version 4 (SigV4) or Signature Version 4A (SigV4A) authentication. This policy injects the required AWS signature headers into requests to authenticate with AWS services, such as Amazon S3, Amazon API Gateway, or other AWS HTTP endpoints.

The AWS Request Signature policy is an extension of the AWS Request Signing filter native to Envoy. To learn more about the AWS Request Signing filter, see [AWS Request Signing Filter](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto). Not all AWS Request Signing filter parameters are available to the AWS Request Signature policy. To find what parameters are configurable, see [Configuring Policy Parameters](#configuring-policy-parameters).

## [](#configuring-policy-parameters)Configuring Policy Parameters

### [](#local-mode)Omni Gateway Local Mode

When you apply the policy via declarative configuration files, Refer to the following policy definition and table of parameters:

```yaml
- policyRef:
    name: native-aws-signature-flex
  config:
    serviceName: <string> // REQUIRED
    region: <string> // REQUIRED
    useUnsignedPayload: <boolean> // OPTIONAL
    signingAlgorithm: <string> // REQUIRED
    matchExcludedHeaders:
      - <string> // OPTIONAL
    authenticationMode: <string> // REQUIRED
    credentialsFileProvider: <object> // OPTIONAL
    inlineCredentialProvider: <object> // OPTIONAL
```

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">If you don’t configure required parameters, the policy the default value. If the policy doesn’t have a default value, there is a configuration error.</td></tr></tbody></table>

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Parameter</th>
<th class="tableblock halign-left valign-top">Required or Optional</th>
<th class="tableblock halign-left valign-top">Default Value</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>serviceName</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The service namespace of the HTTP endpoint. For example: <code>s3</code>, <code>execute-api</code>, or <code>ec2</code>.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>region</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The AWS region of the service hosting the HTTP endpoint.<br>
For <code>AWS_SIGV4</code>, this is a standard AWS region. For example: <code>us-west-2</code>.<br>
For <code>AWS_SIGV4A</code>, this is a region set of comma-separated region names (<code>us-west-2</code>), wildcards (<code><strong></strong></code><strong>), or region strings with wildcards (<code>us-east-</code></strong>). A region set enables a signed request to be sent to multiple regions.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>useUnsignedPayload</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>false</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Use the literal string <code>UNSIGNED-PAYLOAD</code> to calculate the payload hash instead of buffering the request to calculate the hash. Not all services support this option.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>matchExcludedHeaders</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>A list of request header to exclude from signing. Match by any <a href="https://www.envoyproxy.io/docs/envoy/latest/api-v3/type/matcher/v3/string.proto#envoy-v3-api-msg-type-matcher-v3-stringmatcher">Envoy StringMatcher pattern</a>. For example:</p>
</div>
<div class="paragraph">
<p>+</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-yaml hljs" data-lang="yaml">matchExcludedHeaders:
  - prefix: x-envoy
  - exact: x-custom-header
  - exact: x-trace-id</code></pre>
</div>
</div>
<div class="paragraph">
<p>+
In the example, the policy does not sign headers that start with <code>x-envoy</code> and the <code>x-custom-header</code> and <code>x-trace-id</code> headers.</p>
</div>
<div class="paragraph">
<p>+
By default, Envoy excludes the <code>x-forwarded-for</code>, <code>x-forwarded-proto</code>, and <code>x-amzn-trace-id</code> headers.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>signingAlgorithm</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>AWS_SIGV4</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The signing algorithm to use, either <code>AWS_SIGV4</code> or <code>AWS_SIGV4A</code>. <code>AWS_SIGV4A</code> supports multi-region requests.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>authenticationMode</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>default</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Determines the mode of authentication for AWS credentials. Options are:<br>
* <code>default</code>: Uses the AWS credential chain in the order of environment variables, AWS credential file, then AWS roles.<br>
* <code>profile</code>: Uses a specific profile from the AWS credential file.<br>
* <code>static</code>: Uses statically configured credentials provided in <code>inlineCredentialProvider</code>.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>credentialsFileProvider</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Configuration for using credentials from an AWS credential file. Required when <code>authenticationMode</code> is <code>profile</code>. See <a href="#credential-provider-configuration">Credential Provider Configuration</a> for details.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>inlineCredentialProvider</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Configuration for statically configured credentials. Required when <code>authenticationMode</code> is <code>static</code>. See <a href="#credential-provider-configuration">Credential Provider Configuration</a> for details.</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#credential-provider-configuration)Credential Provider Configuration

The credential provider configuration depends on the `authenticationMode` setting:

- **`default`**: No additional configuration needed. The policy uses the AWS credential chain (environment variables, AWS credential file, or AWS roles).
- **`profile`**: Use `credentialsFileProvider` to specify the AWS credential file and profile.
- **`static`**: Use `inlineCredentialProvider` to provide credentials directly in the configuration.

#### [](#credentials-file-provider)Credentials File Provider

Use `credentialsFileProvider` when `authenticationMode` is set to `profile`:

```yaml
credentialsFileProvider:
  credentialsDataSource:
    filename: <string> // REQUIRED
  profile: <string> // OPTIONAL
```

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Parameter</th>
<th class="tableblock halign-left valign-top">Required or Optional</th>
<th class="tableblock halign-left valign-top">Default Value</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>credentialsDataSource.filename</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Path to the AWS credential file. For example: <code>~/.aws/credentials</code>.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>profile</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>default</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The AWS profile name to use from the credential file.</p>
</div></div></td>
</tr>
</tbody>
</table>

#### [](#inline-credential-provider)Inline Credential Provider

Use `inlineCredentialProvider` when `authenticationMode` is set to `static`:

```yaml
inlineCredentialProvider:
  accessKeyId: <string> // REQUIRED
  secretAccessKey: <string> // REQUIRED
  sessionToken: <string> // OPTIONAL
```

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Parameter</th>
<th class="tableblock halign-left valign-top">Required or Optional</th>
<th class="tableblock halign-left valign-top">Default Value</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>accessKeyId</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>AWS access key ID.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>secretAccessKey</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Required</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>AWS secret access key.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>sessionToken</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Optional</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>N/A</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>AWS session token (required for temporary credentials).</p>
</div></div></td>
</tr>
</tbody>
</table>

#### [](#resource-configuration-examples)Resource Configuration Examples

- Basic configuration with default authentication:
    
    ```yaml
    - policyRef:
        name: native-aws-signature-flex
      config:
        serviceName: s3
        region: us-west-2
        signingAlgorithm: AWS_SIGV4
        authenticationMode: default
    ```
- Configuration with static credentials:
    
    ```yaml
    - policyRef:
        name: native-aws-signature-flex
      config:
        serviceName: execute-api
        region: us-east-1
        signingAlgorithm: AWS_SIGV4
        authenticationMode: static
        inlineCredentialProvider:
          accessKeyId: AKIAIOSFODNN7EXAMPLE
          secretAccessKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    ```
- Configuration with profile authentication:
    
    ```yaml
    - policyRef:
        name: native-aws-signature-flex
      config:
        serviceName: s3
        region: us-west-2
        signingAlgorithm: AWS_SIGV4
        authenticationMode: profile
        credentialsFileProvider:
          credentialsDataSource:
            filename: ~/.aws/credentials
          profile: my-profile
    ```
- Configuration with SigV4A and unsigned payload:
    
    ```yaml
    - policyRef:
        name: native-aws-signature-flex
      config:
        serviceName: s3
        region: "*"
        signingAlgorithm: AWS_SIGV4A
        authenticationMode: default
        useUnsignedPayload: true
    ```
- Configuration with excluded headers:
    
    ```yaml
    - policyRef:
        name: native-aws-signature-flex
      config:
        serviceName: s3
        region: us-west-2
        signingAlgorithm: AWS_SIGV4
        authenticationMode: default
        matchExcludedHeaders:
          - prefix: x-envoy
          - exact: x-custom-header
          - exact: x-trace-id
    ```

### [](#connected-mode)Managed Omni Gateway and Omni Gateway Connected Mode

When you apply the policy from the UI, the following parameters are displayed:

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Parameter</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required or Optional</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Service name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The service namespace of the HTTP endpoint. For example: <code>s3</code>, <code>execute-api</code>, or <code>ec2</code>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Region</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The AWS region string for the service. For SigV4, use a standard region. For example: <code>us-west-2</code>. For SigV4A, use a region set of comma-separated region names (<code>us-west-2</code>), wildcards (<code><strong></strong></code><strong>), or region strings with wildcards (<code>us-east-</code></strong>).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Use unsigned payload</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Instead of buffering the request to calculate the payload hash, use the literal string <code>UNSIGNED-PAYLOAD</code>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Signing algorithm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The signing algorithm to use: <code>AWS_SIGV4</code> or <code>AWS_SIGV4A</code>. <code>AWS_SIGV4A</code> supports multi-region requests.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Match excluded headers</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A list of request headers to exclude from signing. Match by any Envoy StringMatcher pattern. For example: <code>prefix: x-envoy</code>, <code>exact: x-custom-header</code>, or <code>exact: x-trace-id</code>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Authentication mode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Determines the mode of authentication for AWS credentials. Options: <code>default</code> (uses AWS credential chain: environment variables, AWS credential file, AWS roles), <code>profile</code> (uses a specific profile from the AWS credential file), or <code>static</code> (uses statically configured credentials).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Credentials file provider</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Configuration for using credentials from an AWS credential file (required when authentication mode is <code>profile</code>).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Credentials file</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Path to the AWS credential file. For example: <code>~/.aws/credentials</code>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required when using credentials file provider</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Profile</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The AWS profile name to use from the credential file.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Inline credential provider</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Configuration for statically configured credentials (required when authentication mode is <code>static</code>).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Access key ID</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">AWS access key ID when using inline credential provider.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required when using inline credential provider</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Secret access key</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">AWS secret access key when using inline credential provider.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required when using inline credential provider</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Session token</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">AWS session token when using inline credential provider with temporary credentials.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional</p></td>
</tr>
</tbody>
</table>