Reference
Archive Request to AWS S3 Policy
Custom Policy Example
Zuplo is extensible, so we don't have a built-in policy for Archive Request to AWS S3, instead we have a template here that shows you how you can use your superpower (code) to achieve your goals. To learn more about custom policies see the documentation.
In this example shows how you can archive the body of incoming requests to AWS S3 Storage. This can be useful for auditing, logging, or archival scenarios. Additionally, you could use this policy to save the body of a request and then enqueue some async work that uses this body.
Configuration
The example below shows how to configure a custom code policy in the 'policies.json' document that utilizes the above example policy code.
Policy Configuration
name
<string> - The name of your policy instance. This is used as a reference in your routes.policyType
<string> - The identifier of the policy. This is used by the Zuplo UI. Value should bearchive-request-aws-s3-inbound
.handler.export
<string> - The name of the exported type. Value should bedefault
.handler.module
<string> - The module containing the policy. Value should be$import(./modules/YOUR_MODULE)
.handler.options
<object> - The options for this policy. See Policy Options below.
Policy Options
The options for this policy are specified below. All properties are optional unless specifically marked as required.
region
<string> -The AWS region where the bucket is locatedbucketName
<string> -The name of the storage bucketpath
<string> -The path where requests are storedaccessKeyId
<string> -The Access Key ID of the account authorized to write to the bucketaccessKeySecret
<string> -The Access Key Secret of the account authorized to write to the bucket
Using the Policy
Read more about how policies work