Fortinet black logo

AWS S3 v3.0.1

Copy Link
Copy Doc ID d886c44d-abe4-11ea-8b7d-00505692583a:27

About the connector

Amazon S3 is a cloud computing web service offered by Amazon Web Services. Amazon S3 provides object storage through web services interfaces.

This document provides information about the AWS S3 connector, which facilitates automated interactions with AWS S3 using FortiSOAR™ playbooks. Add the AWS S3 connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 3.0.1

FortiSOAR™ Version Tested on: 6.4.1-2133

Authored By: Fortinet

Certified: Yes

Release Notes for version 3.0.1

Following enhancements have been made to the AWS S3 connector in version 3.0.1:

  • Certified this version of the connector.
  • Added support for executing actions in a segmented network environment using FortiSOAR (FSR) Agents.
    Important: The following actions that require file handling are not supported in FSR Agent in version 6.4.1 of FortiSOAR™:
    • Upload File into Bucket
    • Download File

Installing the connector

From FortiSOAR™ 5.0.0 onwards, use the Connector Store to install the connector. For the detailed procedure to install a connector, click here.
You can also use the yum command to install connectors. Connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and run the yum command as a root user to install connectors:

yum install cyops-connector-awss3

Prerequisites to configuring the connector

  • You must know your account's AWS region that you will use to access AWS services and the configuration type, either IAM Role or access credentials that you will use to connect to AWS. If you choose access credentials, then you must have the AWS access key ID and the AWS secret access key to access AWS services, and if you choose IAM Role, then you must know the IAM role to access AWS S3 services.
  • To create an AWS access key ID and the secret access key, you need to have "Root User Access" on AWS S3.
    If you want to configure this connector using the "IAM Role", then your FortiSOAR™ machine must be on AWS and the user assigned to the "IAM Role" should have full access to execute FortiSOAR™ actions.
  • To access the FortiSOAR™ UI, ensure that port 443 is open through the firewall for the FortiSOAR™ instance.

Configuring the connector

For the procedure to configure a connector, click here.

Configuration parameters

In FortiSOAR™, on the Connectors page, click the AWS S3 connector row (if you are in the Grid view on the Connectors page), and in the Configurations tab enter the required configuration details.

Parameter Description
Region AWS region of your account to access the AWS S3 services.
Configuration Type AWS configuration type that determines the authentication mechanism that you will use to provide credentials and access AWS S3.
You can choose either IAM Role or Access Credentials to connect to AWS. AWS Identity and Access Management (IAM) role is an IAM entity that defines a set of permissions for making AWS service requests. IAM roles are not associated with a specific user or group. Instead, trusted entities assume roles, such as IAM users, applications, or AWS services.
If you choose IAM Role, then you must specify the following parameter:
  • AWS Instance IAM Role: IAM Role of your AWS instance to access AWS services.
If you choose Access Credentials, then you must specify the following parameters:
  • Access Key: The AWS Access Key to access AWS services.
  • Secret Key: Key of the AWS Secret Access to access AWS services.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

Actions supported by the connector

The following automated operations can be included in playbooks, and you can also use the annotations to access operations from version 4.10.0 onwards:

Function Description Annotation and Category
Create New Bucket Creates a new S3 Bucket in AWS based on the bucket name you have specified. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets from AWS. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket from AWS S3 based on the bucket name and other input parameters you have specified. list_objects
Miscellaneous
Get Object Retrieves details of a specific object and optionally download associated metadata of the file from a specific bucket from AWS S3 based on the bucket name, object key, and other input parameters you have specified. get_object_details
Miscellaneous
Modify Bucket Modifies an existing S3 bucket on AWS based on the bucket name and other input parameters you have specified. modify_bucket
Miscellaneous
Modify Object Modifies an existing object in AWS S3 based on the bucket name, object key, and other input parameters you have specified. modify_object
Miscellaneous
Download File Downloads an S3 object or file from AWS S3 and adds the object or file in the FortiSOAR™ "Attachment" module. download_file
Miscellaneous
Upload File into Bucket Uploads a file from the FortiSOAR™ "Attachment" module to the AWS S3 bucket. upload_file
Miscellaneous
Delete Tag Deletes tags from the specified bucket and/or object on AWS S3. delete_tag
Remediation
Delete Bucket Deletes the specified bucket from AWS S3.
Important: All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
delete_bucket
Remediation
Delete Bucket Object Deletes a specific object from a specific AWS S3 bucket. delete_object
Remediation
Get Bucket Policy Retrieves the policy of the bucket based on the bucket name you have specified. get_bucket_policy
Investigation
Create Bucket Policy Creates (a new policy) and applies that bucket policy to an Amazon S3 bucket based on the bucket name and policy arguments you have specified. put_bucket_policy
Miscellaneous
Replace Bucket Policy Replaces (an existing policy) and applies that bucket policy to an Amazon S3 bucket based on the bucket name and policy arguments you have specified. put_bucket_policy
Miscellaneous

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Name of the new bucket that you want to create in AWS S3.
ACL Permission

(Optional) Canned ACL permissions that you want to apply to the bucket that you are creating in AWS S3.

You can choose from the following options: Private, Public Read, Public Read Write, Authenticated Read.

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPHeaders": {
"date": "",
"location": "",
"content-length": "",
"server": "",
"x-amz-id-2": "",
"x-amz-request-id": ""
},
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"Location": ""
}

"Location": "",
}

operation: List Buckets

Input parameters

None.

Output

The output contains the following populated JSON schema:
{
"Buckets": [
{
"Name": "",
"CreationDate": ""
}
],
"ResponseMetadata": {
"HTTPHeaders": {
"date": "",
"content-type": "",
"server": "",
"transfer-encoding": "",
"x-amz-id-2": "",
"x-amz-request-id": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"Owner": {
"ID": ""
}
}

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket whose objects you want to retrieve from AWS S3.
Starting Key (Optional) Specify the starting key for retrieving the objects from AWS S3, i.e., if you specify the starting key, then only objects with keys after the specified key will be fetched.
Page Size (Optional) Number of objects to be fetched from AWS S3 in a single page. By default, this is set to 1000.

Output

The output contains the following populated JSON schema:
{
"IsTruncated": "",
"KeyCount": "",
"EncodingType": "",
"StartAfter": "",
"Prefix": "",
"Name": "",
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPHeaders": {
"date": "",
"content-type": "",
"server": "",
"transfer-encoding": "",
"x-amz-id-2": "",
"x-amz-request-id": "",
"x-amz-bucket-region": ""
},
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"MaxKeys": ""
}

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket whose object details you want to retrieve from AWS S3.
Object Key Key of the object whose object details you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:
{
"response": {
"acl": {
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPStatusCode": "",
"RetryAttempts": "",
"HTTPHeaders": {}
},
"Grants": [],
"Owner": {
"ID": ""
}
},
"tags": {
"TagSet": [],
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPStatusCode": "",
"RetryAttempts": "",
"HTTPHeaders": {}
}
}
},
"error": ""
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified bucket.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Encryption (Optional) Select the default encryption scheme for items in this bucket. You can choose from the following options: None, AES256, or KMS.
If you select the KMS option, then you must specify the following parameter:
  • KMS Key: The KMS key to be used for KMS encryption.
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:
{
"grants": {
"result": "",
"error": ""
},
"encryption": {
"result": "",
"error": ""
},
"tags": {
"result": "",
"error": ""
}
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to modify in AWS S3.
Object Key Key of the object that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified object.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Download File

Input parameters

Parameter Description
Download Option Select the option, either From Bucket or From URL, from where you want to download the file or object from AWS S3.
If you select the From Bucket option, then you must specify the following parameters:
  • Bucket Name: Name of the bucket from which you want to download the object from AWS S3.
  • Object Key: Key of the object that you want to download from AWS S3.
If you select the From URL option, then you must specify the following parameters:
  • Download File URL: URL of the file that you want to download from AWS S3.
  • Filename for Attachment: (Optional) Specify a filename with which you want to save the file in the FortiSOAR™ "Attachment" module. This filename will override the default filename.

Output

The output contains the following populated JSON schema:
{
"@type": "",
"modifyDate": "",
"@context": "",
"name": "",
"id": "",
"modifyUser": {
"@type": "",
"userType": "",
"avatar": "",
"modifyDate": "",
"@id": "",
"id": "",
"modifyUser": "",
"userId": "",
"createUser": "",
"@settings": "",
"name": "",
"createDate": ""
},
"createUser": {
"@type": "",
"userType": "",
"avatar": "",
"modifyDate": "",
"@id": "",
"id": "",
"modifyUser": "",
"userId": "",
"createUser": "",
"@settings": "",
"name": "",
"createDate": ""
},
"type": "",
"description": "",
"@id": "",
"createDate": "",
"file": {
"@type": "",
"uploadDate": "",
"mimeType": "",
"metadata": "",
"owners": [],
"@id": "",
"file": {
"@type": ""
},
"filename": "",
"size": "",
"@context": ""
}
}

operation: Upload File into Bucket

Input parameters

Parameter Description
Bucket Name Name of the AWS S3 bucket into which you want to upload the file from the FortiSOAR™ "Attachment" module.
File ID(IRI) ID or IRI value of the file that you want to upload to the specified AWS S3 bucket.
In the playbook, the file ID or IRI is used to access the file from the FortiSOAR™ "Attachment" module.
Key for Object Unique key for the newly uploaded object.
Note: This key is used to access this file.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Delete Tag

Input parameters

Parameter Description
Select Select Bucket or Object or both from which you want to delete tags on AWS S3.
If you select Bucket then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket from which you want to delete the specified tag.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can delete multiple tags using the comma separator. For example, key1,key2,key3...
If you select Object, then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket that contains the target object.
  • Object Key: Key of the object from which you want to delete the specified tags.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can delete multiple tags using the comma separator. For example, key1,key2,key3...

Output

The output contains a non-dictionary value.

operation: Delete Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Delete Bucket Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to delete from AWS S3.
Object Key Key of the object that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Get Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket whose policy contents you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:
{
"Policy": {
"Id": "",
"Version": "",
"Statement": [
{
"Resource": "",
"Sid": "",
"Effect": "",
"Action": "",
"Principal": {
"AWS": ""
}
}
]
},
"ResponseMetadata": {
"HTTPHeaders": {
&nnbsp; "x-amz-id-2": "",
"content-length": "",
"date": "",
"content-type": "",
"server": "",
"x-amz-request-id": ""
},
"RetryAttempts": "",
"HostId": "",
"HTTPStatusCode": "",
"RequestId": ""
}
}

operation: Create Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket to which you want to apply the specified policy in AWS S3.
Policy Arguments Policy arguments, in the JSON format, for the policy that you want to create for the specified bucket.
Use the following link to generate the policy payload: https://awspolicygen.s3.amazonaws.com/policygen.html
For example: "{\"Id\": \"Policy1587973025262\", \"Version\": \"2012-10-17\", \"Statement\": [{\"Sid\": \"Stmt1587972287815\", \"Action\": \"s3:*\",\"Effect\": \"Allow\",\"Resource\": \"arn:aws:s3:::bucket_name\", \"Principal\": \"*\"}]}"

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RetryAttempts": "",
"HTTPHeaders": {
"content-type": "",
"x-amz-id-2": "",
"transfer-encoding": "",
"server": "",
"x-amz-request-id": "",
"date": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": ""
}
}

operation: Replace Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket to which you want to apply the specified (updated) policy in AWS S3.
Policy Arguments Policy arguments, in the JSON format, for the policy that you want to replace in the specified bucket.
Use the following link to generate the policy payload: https://awspolicygen.s3.amazonaws.com/policygen.html

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RetryAttempts": "",
"HTTPHeaders": {
"content-type": "",
"x-amz-id-2": "",
"transfer-encoding": "",
"server": "",
"x-amz-request-id": "",
"date": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": ""
}
}

Included playbooks

The Sample - AWS S3 - 3.0.1 playbook collection comes bundled with the AWS S3 connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the AWS S3 connector.

  • Create Bucket Policy
  • Create New Bucket
  • Delete Bucket
  • Delete Bucket Object
  • Delete Tag
  • Download File
  • Get Bucket Policy
  • Get Object
  • List Buckets
  • List Objects
  • Modify Bucket
  • Modify Object
  • Replace Bucket Policy
  • Upload File into Bucket

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during the connector upgrade and delete.

Previous
Next

About the connector

Amazon S3 is a cloud computing web service offered by Amazon Web Services. Amazon S3 provides object storage through web services interfaces.

This document provides information about the AWS S3 connector, which facilitates automated interactions with AWS S3 using FortiSOAR™ playbooks. Add the AWS S3 connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 3.0.1

FortiSOAR™ Version Tested on: 6.4.1-2133

Authored By: Fortinet

Certified: Yes

Release Notes for version 3.0.1

Following enhancements have been made to the AWS S3 connector in version 3.0.1:

Installing the connector

From FortiSOAR™ 5.0.0 onwards, use the Connector Store to install the connector. For the detailed procedure to install a connector, click here.
You can also use the yum command to install connectors. Connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and run the yum command as a root user to install connectors:

yum install cyops-connector-awss3

Prerequisites to configuring the connector

Configuring the connector

For the procedure to configure a connector, click here.

Configuration parameters

In FortiSOAR™, on the Connectors page, click the AWS S3 connector row (if you are in the Grid view on the Connectors page), and in the Configurations tab enter the required configuration details.

Parameter Description
Region AWS region of your account to access the AWS S3 services.
Configuration Type AWS configuration type that determines the authentication mechanism that you will use to provide credentials and access AWS S3.
You can choose either IAM Role or Access Credentials to connect to AWS. AWS Identity and Access Management (IAM) role is an IAM entity that defines a set of permissions for making AWS service requests. IAM roles are not associated with a specific user or group. Instead, trusted entities assume roles, such as IAM users, applications, or AWS services.
If you choose IAM Role, then you must specify the following parameter:
  • AWS Instance IAM Role: IAM Role of your AWS instance to access AWS services.
If you choose Access Credentials, then you must specify the following parameters:
  • Access Key: The AWS Access Key to access AWS services.
  • Secret Key: Key of the AWS Secret Access to access AWS services.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

Actions supported by the connector

The following automated operations can be included in playbooks, and you can also use the annotations to access operations from version 4.10.0 onwards:

Function Description Annotation and Category
Create New Bucket Creates a new S3 Bucket in AWS based on the bucket name you have specified. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets from AWS. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket from AWS S3 based on the bucket name and other input parameters you have specified. list_objects
Miscellaneous
Get Object Retrieves details of a specific object and optionally download associated metadata of the file from a specific bucket from AWS S3 based on the bucket name, object key, and other input parameters you have specified. get_object_details
Miscellaneous
Modify Bucket Modifies an existing S3 bucket on AWS based on the bucket name and other input parameters you have specified. modify_bucket
Miscellaneous
Modify Object Modifies an existing object in AWS S3 based on the bucket name, object key, and other input parameters you have specified. modify_object
Miscellaneous
Download File Downloads an S3 object or file from AWS S3 and adds the object or file in the FortiSOAR™ "Attachment" module. download_file
Miscellaneous
Upload File into Bucket Uploads a file from the FortiSOAR™ "Attachment" module to the AWS S3 bucket. upload_file
Miscellaneous
Delete Tag Deletes tags from the specified bucket and/or object on AWS S3. delete_tag
Remediation
Delete Bucket Deletes the specified bucket from AWS S3.
Important: All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
delete_bucket
Remediation
Delete Bucket Object Deletes a specific object from a specific AWS S3 bucket. delete_object
Remediation
Get Bucket Policy Retrieves the policy of the bucket based on the bucket name you have specified. get_bucket_policy
Investigation
Create Bucket Policy Creates (a new policy) and applies that bucket policy to an Amazon S3 bucket based on the bucket name and policy arguments you have specified. put_bucket_policy
Miscellaneous
Replace Bucket Policy Replaces (an existing policy) and applies that bucket policy to an Amazon S3 bucket based on the bucket name and policy arguments you have specified. put_bucket_policy
Miscellaneous

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Name of the new bucket that you want to create in AWS S3.
ACL Permission

(Optional) Canned ACL permissions that you want to apply to the bucket that you are creating in AWS S3.

You can choose from the following options: Private, Public Read, Public Read Write, Authenticated Read.

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPHeaders": {
"date": "",
"location": "",
"content-length": "",
"server": "",
"x-amz-id-2": "",
"x-amz-request-id": ""
},
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"Location": ""
}

"Location": "",
}

operation: List Buckets

Input parameters

None.

Output

The output contains the following populated JSON schema:
{
"Buckets": [
{
"Name": "",
"CreationDate": ""
}
],
"ResponseMetadata": {
"HTTPHeaders": {
"date": "",
"content-type": "",
"server": "",
"transfer-encoding": "",
"x-amz-id-2": "",
"x-amz-request-id": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"Owner": {
"ID": ""
}
}

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket whose objects you want to retrieve from AWS S3.
Starting Key (Optional) Specify the starting key for retrieving the objects from AWS S3, i.e., if you specify the starting key, then only objects with keys after the specified key will be fetched.
Page Size (Optional) Number of objects to be fetched from AWS S3 in a single page. By default, this is set to 1000.

Output

The output contains the following populated JSON schema:
{
"IsTruncated": "",
"KeyCount": "",
"EncodingType": "",
"StartAfter": "",
"Prefix": "",
"Name": "",
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPHeaders": {
"date": "",
"content-type": "",
"server": "",
"transfer-encoding": "",
"x-amz-id-2": "",
"x-amz-request-id": "",
"x-amz-bucket-region": ""
},
"HTTPStatusCode": "",
"RetryAttempts": ""
},
"MaxKeys": ""
}

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket whose object details you want to retrieve from AWS S3.
Object Key Key of the object whose object details you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:
{
"response": {
"acl": {
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPStatusCode": "",
"RetryAttempts": "",
"HTTPHeaders": {}
},
"Grants": [],
"Owner": {
"ID": ""
}
},
"tags": {
"TagSet": [],
"ResponseMetadata": {
"RequestId": "",
"HostId": "",
"HTTPStatusCode": "",
"RetryAttempts": "",
"HTTPHeaders": {}
}
}
},
"error": ""
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified bucket.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Encryption (Optional) Select the default encryption scheme for items in this bucket. You can choose from the following options: None, AES256, or KMS.
If you select the KMS option, then you must specify the following parameter:
  • KMS Key: The KMS key to be used for KMS encryption.
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:
{
"grants": {
"result": "",
"error": ""
},
"encryption": {
"result": "",
"error": ""
},
"tags": {
"result": "",
"error": ""
}
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to modify in AWS S3.
Object Key Key of the object that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified object.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Download File

Input parameters

Parameter Description
Download Option Select the option, either From Bucket or From URL, from where you want to download the file or object from AWS S3.
If you select the From Bucket option, then you must specify the following parameters:
  • Bucket Name: Name of the bucket from which you want to download the object from AWS S3.
  • Object Key: Key of the object that you want to download from AWS S3.
If you select the From URL option, then you must specify the following parameters:
  • Download File URL: URL of the file that you want to download from AWS S3.
  • Filename for Attachment: (Optional) Specify a filename with which you want to save the file in the FortiSOAR™ "Attachment" module. This filename will override the default filename.

Output

The output contains the following populated JSON schema:
{
"@type": "",
"modifyDate": "",
"@context": "",
"name": "",
"id": "",
"modifyUser": {
"@type": "",
"userType": "",
"avatar": "",
"modifyDate": "",
"@id": "",
"id": "",
"modifyUser": "",
"userId": "",
"createUser": "",
"@settings": "",
"name": "",
"createDate": ""
},
"createUser": {
"@type": "",
"userType": "",
"avatar": "",
"modifyDate": "",
"@id": "",
"id": "",
"modifyUser": "",
"userId": "",
"createUser": "",
"@settings": "",
"name": "",
"createDate": ""
},
"type": "",
"description": "",
"@id": "",
"createDate": "",
"file": {
"@type": "",
"uploadDate": "",
"mimeType": "",
"metadata": "",
"owners": [],
"@id": "",
"file": {
"@type": ""
},
"filename": "",
"size": "",
"@context": ""
}
}

operation: Upload File into Bucket

Input parameters

Parameter Description
Bucket Name Name of the AWS S3 bucket into which you want to upload the file from the FortiSOAR™ "Attachment" module.
File ID(IRI) ID or IRI value of the file that you want to upload to the specified AWS S3 bucket.
In the playbook, the file ID or IRI is used to access the file from the FortiSOAR™ "Attachment" module.
Key for Object Unique key for the newly uploaded object.
Note: This key is used to access this file.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Delete Tag

Input parameters

Parameter Description
Select Select Bucket or Object or both from which you want to delete tags on AWS S3.
If you select Bucket then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket from which you want to delete the specified tag.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can delete multiple tags using the comma separator. For example, key1,key2,key3...
If you select Object, then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket that contains the target object.
  • Object Key: Key of the object from which you want to delete the specified tags.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can delete multiple tags using the comma separator. For example, key1,key2,key3...

Output

The output contains a non-dictionary value.

operation: Delete Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Delete Bucket Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to delete from AWS S3.
Object Key Key of the object that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:
{
"result": {},
"error": ""
}

operation: Get Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket whose policy contents you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:
{
"Policy": {
"Id": "",
"Version": "",
"Statement": [
{
"Resource": "",
"Sid": "",
"Effect": "",
"Action": "",
"Principal": {
"AWS": ""
}
}
]
},
"ResponseMetadata": {
"HTTPHeaders": {
&nnbsp; "x-amz-id-2": "",
"content-length": "",
"date": "",
"content-type": "",
"server": "",
"x-amz-request-id": ""
},
"RetryAttempts": "",
"HostId": "",
"HTTPStatusCode": "",
"RequestId": ""
}
}

operation: Create Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket to which you want to apply the specified policy in AWS S3.
Policy Arguments Policy arguments, in the JSON format, for the policy that you want to create for the specified bucket.
Use the following link to generate the policy payload: https://awspolicygen.s3.amazonaws.com/policygen.html
For example: "{\"Id\": \"Policy1587973025262\", \"Version\": \"2012-10-17\", \"Statement\": [{\"Sid\": \"Stmt1587972287815\", \"Action\": \"s3:*\",\"Effect\": \"Allow\",\"Resource\": \"arn:aws:s3:::bucket_name\", \"Principal\": \"*\"}]}"

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RetryAttempts": "",
"HTTPHeaders": {
"content-type": "",
"x-amz-id-2": "",
"transfer-encoding": "",
"server": "",
"x-amz-request-id": "",
"date": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": ""
}
}

operation: Replace Bucket Policy

Input parameters

Parameter Description
Bucket Name Name of the bucket to which you want to apply the specified (updated) policy in AWS S3.
Policy Arguments Policy arguments, in the JSON format, for the policy that you want to replace in the specified bucket.
Use the following link to generate the policy payload: https://awspolicygen.s3.amazonaws.com/policygen.html

Output

The output contains the following populated JSON schema:
{
"ResponseMetadata": {
"RetryAttempts": "",
"HTTPHeaders": {
"content-type": "",
"x-amz-id-2": "",
"transfer-encoding": "",
"server": "",
"x-amz-request-id": "",
"date": ""
},
"HostId": "",
"RequestId": "",
"HTTPStatusCode": ""
}
}

Included playbooks

The Sample - AWS S3 - 3.0.1 playbook collection comes bundled with the AWS S3 connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the AWS S3 connector.

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during the connector upgrade and delete.

Previous
Next