Let Oomnitza be your single source of truth!
You'll get complete visibility of your assets as data from AWS S3 is automatically transformed into consumable information and actionable insights.
Connect Oomnitza and AWS S3 in minutes
Get the information and insights that you need to reduce costs and the time that you spend on administration tasks such as:
- Configurable dashboards and list views of key information
- Configurable reports to share information with your colleagues and management
- Configurable asset workflows that you can easily create to retrieve bucket information such as:
- S3 Bucket location, size, and tags
- The encryption configuration, website configuration, and versioning state of an S3 bucket
- Bucket Access Control Lists and bucket objects.
Let Oomnitza be your single source of truth!
You'll get visibility of your devices as data from AWS S3 is automatically transformed into consumable information and actionable insights.
AWS S3 Get Bucket Location (region)
AWS S3 Get number of objects in the Bucket
Before you start
Before you create workflows, you need to have added your AWS credentials to Oomnitza. Follow the steps in Adding your AWS S3 credentials to Oomnitza.
We recommend that you also create the extended integration for AWS S3 assets. You can use the asset integration to retrieve the AWS Region which will be required for creating asset workflows.
Important
Due to an issue on AWS side, you can only use bucket names that do not include a dot. For example, having the name "oomnitza.com" will not work for the presets listed below. You can find more information about this issue here.
Note
Unlike the integration, these workflows are not enabled for cross-account access. As a result, when performing create, fetch, update, and delete operations, you must use credentials that belong to the target account you intend to work with.
Creating workflows
Create asset workflows
To create an asset workflow, you must complete these steps:
- Click Configuration > Workflows
- Click Add (+) and select Assets from the list.
- Drag and drop the API block onto the Sandbox.
- Click Edit on the API block and enter AWS S3 in the search field.
- Select a preset:
- To choose a preset, click the forward arrow (>).
- Select the credentials that you created in Adding your AWS S3 credentials to Oomnitza.
- Configure the API Block following the preset instructions below, and save your changes.
- Edit the Begin Block and add rules to trigger the workflow. For example, if you set the Actions to New you can trigger a workflow every time a new asset is created. Refer to Using the Begin block.
- Connect the Blocks.
- Save, validate, and activate your workflow.
Using the AWS S3 Get Bucket Location (region) preset
This preset allows you to get the location (region) for a given S3 bucket. You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Information tab. You will notice that the AWS Serial Number is referenced in the property
{{serial_number}}. Follow the mapping steps in Creating an asset integration so that this property exists in Oomnitza and is populated with information before you run this workflow. - Select the Response tab. You can return the region in the response by mapping the custom Jinja statement in the Response field to an Oomnitza field, such as AWS Region. For information on creating custom fields, see Creating Custom Fields in Oomnitza.
Note
Since the region of a bucket does not change after it has been created, once you create a workflow that is triggered on a new bucket you do not need to use this preset again.
For further information, refer to AWS Documentation: Regions, Availability Zones, and Local Zones.
Using the AWS S3 Get Bucket Tagging preset
The AWS S3 Get Bucket Tagging preset returns the tag set associated with the bucket. You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Information tab. The AWS Serial Number is referenced in the property
{{serial_number}}. Follow the mapping steps in Creating an asset integration so that this property exists in Oomnitza and is populated with information before you run this workflow. The AWS Region is referenced in the property{{aws_region}}.Run the AWS S3 Get Location (region) preset so that this property exists in Oomnitza and is populated with information before you run this workflow. Alternatively, replace the property with the AWS Region, for exampleus-west-1. See Regions, Availability Zones, and Local Zones. - Select the Response tab. Copy the custom Jinja statement to the Response field as many times as is required so that every bucket tag returned in the response is matched to an Oomnitza field.
For information on creating custom fields, see Creating Custom Fields in Oomnitza.
Using the AWS S3 Get Bucket size
This preset allows you to get the size of an S3 bucket in MB. You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Information tab. You will notice that the AWS Region is referenced in the property
{{aws_region}}. Run the AWS S3 Get Location (region) preset so that this property exists in Oomnitza and is populated with information before you run this workflow. Alternatively, replace the property with the AWS Region, for exampleus-west-1. See Regions, Availability Zones, and Local Zones. - Select the Response tab. You can return the Bucket Size and Last file activity time stamp in the response by mapping the custom Jinja statement in the Response field to the following Oomnitza fields:
Tip
If you would prefer to return the Bucket Size in MB, simply adjust the Jinja2 query by adding another division by 1024 to it.
Note
Within this API there is a call to Amazon metrics. For more information, refer to CloudWatch Metric. This call only works if files have been added or removed from the bucket within the last 30 days. If no files have been added or removed during this period, the API returns an empty response which in turn does not update the mapped field in Oomnitza and returns an API fail on the response mapping, which is expected behavior.
For information on creating custom fields, see Creating Custom Fields in Oomnitza.
Using the AWS S3 Get Number of Objects in the Bucket
This preset allows you to get the number of objects (files) of an S3 bucket. You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Information tab. You will notice that the AWS Region is referenced in the property
{{aws_region}}. Run the AWS S3 Get Location (region) preset so that this property exists in Oomnitza and is populated with information before you run this workflow. Alternatively, replace the property with the AWS Region, for exampleus-west-1. See Regions, Availability Zones, and Local Zones. - Select the Response tab. You can return the Number of Bucket Objects in the response by mapping the custom Jinja statement in the Response field to the following Oomnitza field:
Note
Within this API there is a call to Amazon metrics. For more information, refer to CloudWatch Metric. This call only works if files have been added or removed from the bucket within the last 30 days. If no files have been added or removed during this period, the API returns an empty response which in turn does not update the mapped field in Oomnitza and returns an API fail on the response mapping, which is expected behavior.
For information on creating custom fields, see Creating Custom Fields in Oomnitza.
Using the AWS S3 Get Bucket ACL preset
The AWS S3 Get Bucket ACL preset gets the Access Control List (ACL) of a bucket. You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Information tab. The AWS Serial Number is referenced in the property
{{serial_number}}. Follow the mapping steps in Creating an asset integration so that this property exists in Oomnitza and is populated with information before you run this workflow. The AWS Region is referenced in the property{{aws_region}}.Run the AWS S3 Get Location (region) preset so that this property exists in Oomnitza and is populated with information before you run this workflow. Alternatively, replace the property with the AWS Region, for exampleus-west-1. See Regions, Availability Zones, and Local Zones. - Select the Response tab. You can map the entire response by placing
{{response}}in the Response field and mapping it to a custom long text Oomnitza field, such as API Response.
For further information, refer to AWS API Documentation: GetBucket ACL.
Using the AWS S3 Get Bucket Encryption preset
The AWS S3 Get Bucket Encryption preset returns the default encryption configuration for an Amazon S3 bucket. You can configure the message payload by following the steps in using the AWS S3 Get Bucket ACL preset. For further information, refer to AWS API Documentation: Get-bucket-encryption.
Using the AWS S3 Get Versioning preset
The AWS S3 Get Versioning preset returns the versioning state of a bucket. You can configure the message payload by following the steps in using the AWS S3 Get Bucket ACL preset. For further information, refer to AWS API Documentation: Get-bucket-versioning.
Using the AWS S3 Get Bucket Website preset
The AWS S3 Get Bucket Website returns the website configuration for a bucket. You can configure the message payload by following the steps in using the AWS S3 Get Bucket ACL preset. For further information, refer to AWS API Documentation: GetBucketWebsite.
Comments
0 comments
Please sign in to leave a comment.