• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

AWS S3 actions

|View as Markdown

Use these actions to list, retrieve, upload, and delete objects in Amazon S3 buckets.

Prerequisites

For prerequisites and credentials setup, see Set up AWS credentials.

List objects in a bucket

Action identifier: aws.s3.listObjectsV2 Returns some or all (up to 1,000) of the objects in a bucket with their metadata. It is the recommended version of listObjects.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region of the target bucket.

us-east-2

bucket

String

Required. Name of the S3 bucket to list objects from.

examplebucket

prefix

String

Optional. Limits the response to keys that begin with this prefix.

path/to/folder/

maxKeys

Integer

Optional. Maximum number of keys to return (up to 1,000).

100

continuationToken

String

Optional. Token from a previous response to retrieve the next page of results.

some-token

parameters

Map

Optional. Additional boto3 parameters to pass to the API call.

{"Delimiter": "/"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "response", "expression": ".response"}]

name: aws-s3-list-objects-v2
description: 'List Objects in an AWS S3 Bucket'
steps:
- name: aws_s3_listObjectsV2_1
type: action
action: aws.s3.listObjectsV2
version: '1'
inputs:
awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role"
region: "us-east-2"
bucket: "examplebucket"
prefix: "path/to/folder/"
maxKeys: 100
next: end

Delete an object from a bucket

Action identifier: aws.s3.deleteObject Permanently removes a single object from a bucket. For versioned buckets, this operation inserts a delete marker, which hides the object without permanently deleting it unless you specify a VersionId.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region of the target bucket.

us-east-2

bucket

String

Required. Name of the S3 bucket containing the object.

examplebucket

key

String

Required. Full key (path) of the object to delete.

path/to/object.txt

parameters

Map

Optional. Additional boto3 parameters to pass to the API call.

{"VersionId": "testVersion", "MFA": "Test"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "response", "expression": ".response"}]

Output

Type

Example

response

Object

See the delete_object boto3 reference.

success

Boolean

true or false

errorMessage

String

"Parameter validation failed: Invalid bucket name"

name: aws-s3-delete-object
description: 'Delete an AWS S3 Object'
steps:
- name: aws_s3_deleteObject_1
type: action
action: aws.s3.deleteObject
version: '1'
inputs:
awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role"
region: "us-west-2"
bucket: "my-bucket"
key: "path/to/object.txt"
next: end

Add an object to a bucket

Action identifier: aws.s3.putObject Adds an object to a bucket. Amazon S3 is a distributed system — if it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region of the target bucket.

us-east-2

bucket

String

Required. Name of the S3 bucket to upload the object to.

examplebucket

key

String

Required. Full key (path) for the object in the bucket.

path/to/object.txt

body

String

Required. The object data to upload.

file content

contentType

String

Required. Standard MIME type of the object.

plain/text

tagging

String

Optional. URL-encoded tag set to apply to the object.

key1=value1

parameters

Map

Optional. Additional boto3 parameters to pass to the API call.

{"ServerSideEncryption": "AES256", "Metadata": {"metadata1": "value1"}}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "response", "expression": ".response"}]

Output

Type

Example

response

Object

See the put_object boto3 reference.

success

Boolean

true or false

errorMessage

String

"An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist"

name: s3-put-object
description: 'Put an AWS S3 Object'
steps:
- name: aws_s3_putObject_1
type: action
action: aws.s3.putObject
version: '1'
inputs:
awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role"
region: "us-east-2"
bucket: "examplebucket"
key: "path/to/object.txt"
body: "Hello world"
contentType: "plain/text"
tagging: "key1=value1"
next: end

Retrieve an object from a bucket

Action identifier: aws.s3.getObject Retrieves an object from Amazon S3. Specify the full key name for the object in the request.

Important

This action fails if the object is larger than 100 KB.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region of the target bucket.

us-east-2

bucket

String

Required. Name of the S3 bucket containing the object.

examplebucket

key

String

Required. Full key (path) of the object to retrieve.

path/to/object.txt

versionId

String

Optional. Version ID of the object to retrieve. If omitted, the current version is returned.

some-version-id

range

String

Optional. HTTP range header to retrieve a specific byte range of the object.

bytes=0-99

parameters

Map

Optional. Additional boto3 parameters to pass to the API call.

{"ChecksumMode": "ENABLED"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "response", "expression": ".response"}]

Output

Type

Example

response

Object

See the get_object boto3 reference.

success

Boolean

true or false

errorMessage

String

"An error occurred (InvalidArgument) when calling the GetObject operation: Invalid version id specified"

name: s3-get-object
description: 'Get an AWS S3 Object'
steps:
- name: aws_s3_getObject_1
type: action
action: aws.s3.getObject
version: '1'
inputs:
awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role"
region: "us-east-2"
bucket: "examplebucket"
key: "path/to/object.txt"
next: end
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.