steampipe plugin install aws

Table: aws_wellarchitected_share_invitation - Query AWS Well-Architected Tool Share Invitations using SQL

The AWS Well-Architected Tool Share Invitations are part of AWS's Well-Architected Tool, which enables you to review the state of your workloads and compares them to the latest AWS architectural best practices. The share invitations specifically allow for the sharing of workload reports with other AWS accounts. This aids in collaborative efforts to improve system performance, increase security, and optimize costs.

Table Usage Guide

The aws_wellarchitected_share_invitation table in Steampipe provides you with information about share invitations within the AWS Well-Architected Tool. This table allows you, as a DevOps engineer, to query invitation-specific details, including the invitation status, the recipient's AWS account ID, and associated metadata. You can utilize this table to gather insights on share invitations, such as pending invitations, accepted invitations, and more. The schema outlines the various attributes of the share invitation for you, including the invitation ARN, workload ID, permission type, and invitation status.

Examples

Basic info

Explore which resources have been shared in your AWS Well-Architected environment. This can help you understand who has access to what, allowing you to maintain better control over your data and resources.

select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation;
select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation;

List invitations for Well-Architected lens resources

This example helps to identify the sharing invitations related to Well-Architected lens resources. It is particularly useful for understanding who has shared these resources and with whom, providing insights into the distribution and permissions of your Well-Architected lens resources.

select
lens_arn,
lens_name,
share_invitation_id,
permission_type,
shared_by,
shared_with
from
aws_wellarchitected_share_invitation
where
share_resource_type = 'LENS'
or lens_arn is not null;
select
lens_arn,
lens_name,
share_invitation_id,
permission_type,
shared_by,
shared_with
from
aws_wellarchitected_share_invitation
where
share_resource_type = 'LENS'
or lens_arn is not null;

List invitations for Well-Architected workload resources

Explore which Well-Architected workload resources have been shared with others. This can be useful for auditing purposes or to understand the distribution of workload resources within your organization.

select
workload_id,
workload_name,
share_invitation_id,
permission_type,
shared_by,
shared_with
from
aws_wellarchitected_share_invitation
where
share_resource_type = 'WORKLOAD'
or workload_id is not null;
select
workload_id,
workload_name,
share_invitation_id,
permission_type,
shared_by,
shared_with
from
aws_wellarchitected_share_invitation
where
share_resource_type = 'WORKLOAD'
or workload_id is not null;

List invitations allowing CONTRIBUTOR permission to resources

Determine the areas in which contributor permissions have been granted to resources. This allows for oversight and management of resource access within the AWS Well-Architected framework.

select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation
where
permission_type = 'CONTRIBUTOR';
select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation
where
permission_type = 'CONTRIBUTOR';

List invitations allowing READONLY permission to resources

Explore which share invitations are granting READONLY permissions in your AWS Well-Architected environment. This can help identify potential security risks and ensure that only authorized users have access to sensitive resources.

select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation
where
permission_type = 'READONLY';
select
share_invitation_id,
permission_type,
shared_by,
shared_with,
share_resource_type
from
aws_wellarchitected_share_invitation
where
permission_type = 'READONLY';

List total invitations for each resource type

Explore the distribution of share invitations across different resource types in your AWS Well-Architected tool. This can help you understand which resources are most frequently shared, aiding in resource management and security practices.

select
count(*) as total,
share_resource_type
from
aws_wellarchitected_share_invitation
group by
share_resource_type;
select
count(*) as total,
share_resource_type
from
aws_wellarchitected_share_invitation
group by
share_resource_type;

Schema for aws_wellarchitected_share_invitation

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
lens_arntextThe ARN for the lens.
lens_nametext=The full name of the lens.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
permission_typetextPermission granted on a workload share.
regiontextThe AWS Region in which the resource is located.
share_invitation_idtextThe ID assigned to the share invitation.
share_resource_typetext=The resource type of the share invitation.
shared_bytextAn Amazon Web Services account ID.
shared_withtextThe Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
workload_idtextThe ID assigned to the workload.
workload_nametext=The name of the workload.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_wellarchitected_share_invitation