Transform and save HTTP payloads to Amazon S3
@dylburger
code:
data:privatelast updated:1 year ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 200,000+ developers using the Pipedream platform
steps.
trigger
HTTP
steps.
transform
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across invocations with$checkpoint.
async (event, steps) => {
1
2
3
4
5
6
7
8
9
}
10
// Extract a subset of the HTTP POST body (in event.body),
// saving that as the payload to send to S3
const { name, title } = event.body

this.payload = {
  name,
  title,
}
steps.
save_data_to_s3
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across invocations with$checkpoint.
async (event, steps) => {
1
2
3
4
5
6
7
8
}
9
// Before sending data to your bucket, you'll need to add the required 
// bucket policy: https://docs.pipedream.com/destinations/s3/#s3-bucket-policy
$send.s3({
  payload: steps.transform.payload,
  bucket: "my-s3-bucket",
  prefix: "pipedream/",
})