Managing constellation connections
AWS Ops Agent uses a connection only while both Agent Spaces have created complementary sides of it, so you need to check and maintain your connections after you create them.
This topic explains how to do the following:
Check the status of the constellation connections of an Agent Space.
Troubleshoot connections that stay Pending, errors when you create a connection, and failures with encrypted Agent Spaces.
Remove a connection.
Understand what happens to connections when you delete an Agent Space.
For an overview of constellations, see Agent Space Constellations.
You manage the connections of an Agent Space on its Constellations tab in the AWS Ops Agent console. Each Agent Space lists only its own side of each connection.
Checking the status of a connection
The Status column of the Connections table shows the state of each connection from the point of view of your Agent Space. The status changes when either owner creates or removes a side of the connection, or deletes an Agent Space.
The following table describes the possible values in the Status column.
| Status | Meaning |
|---|---|
| Active | Both Agent Spaces have created complementary sides of the connection. AWS Ops Agent can use the connection. |
| Pending | The connection isn't complete. The other Agent Space hasn't created its side of the connection. Or, it created its side with a role that doesn't complement yours, or removed its side. |
| Broken | The owner of the other Agent Space deleted it. The connection can't become Active again. |
AWS Ops Agent uses a connection only while its status is Active.
After either side changes, AWS Ops Agent can take several minutes to update the status. To see the current status, choose the refresh button above the Connections table.
Troubleshooting constellation connections
If a connection doesn't reach Active, or AWS Ops Agent can't use it, use the following sections to find the cause and resolve it:
A connection stays Pending – The two sides don't match.
Errors when you create a connection – The new connection breaks a connection limit or targets the wrong Agent Space.
Calls into an encrypted Agent Space fail – The connection is Active, but the calling Agent Space can't decrypt data.
A connection stays Pending
Your connection stays Pending until the other Agent Space has a complementary side that matches it. A missing side and a wrong role look the same from your Agent Space.
To resolve a Pending connection
Work through the following checks with the owner of the other Agent Space.
Make sure that the other side exists. If it doesn't, ask the other owner to create a connection from their Agent Space that names the Amazon Resource Name (ARN) of your Agent Space.
Make sure that the roles complement each other. A lead pairs with a member, and a consumer pairs with a dependency. For example, if both sides chose Connect as lead, the connection stays Pending. If a side has the wrong role, its owner removes that side and creates it again with the right role. For more information about the roles, see Agent Space Constellations.
Make sure that each side entered the exact ARN of the other Agent Space, including its Region and account ID.
Make sure that the other owner didn't remove their side. When the other owner disconnects, your side changes to Pending. Your Agent Space still lists the connection until you disconnect it too.
After both sides match, the status changes to Active. The update can take several minutes, so refresh the Connections table.
AWS Ops Agent doesn't support connections between some pairs of AWS Regions. A connection between those Regions stays Pending.
Errors when you create a connection
AWS Ops Agent limits connections in the following ways:
An Agent Space can have only one lead.
Two Agent Spaces can have only one connection between them.
An Agent Space can have up to 100 consumers.
Both Agent Spaces must be in AWS Regions within the
awspartition. Agent Space Constellations isn't available in AWS GovCloud (US).
If you try to create a connection that breaks one of these rules, or that targets your own Agent Space, the console shows one of the errors in the following table. The error messages use AgentSpace to mean Agent Space.
| Error | Cause and resolution |
|---|---|
| This AgentSpace already has a lead association. Only one lead association is allowed per AgentSpace. | You chose Connect as member, but your Agent Space already has a lead. To engage the other Agent Space, connect as a consumer instead. |
| A constellation association already exists between these AgentSpaces. | The two Agent Spaces are already connected. Two Agent Spaces can have only one connection. To change the existing connection, remove it, and then create a new one. |
| An AgentSpace cannot be associated with itself. | You entered the ARN of your own Agent Space as the target. Enter the ARN of the other Agent Space. |
| targetAgentSpaceArn must be in a *partition* partition region. | You entered the ARN of an Agent Space outside the aws partition. Enter the ARN of an Agent Space in an AWS Region within the aws partition. |
| This AgentSpace already has 100 consumer associations, the maximum allowed. | You chose Connect as dependency, but your Agent Space already has 100 consumers. You can't adjust this limit. |
Calls into an encrypted Agent Space fail
An investigation can fail to read from an Agent Space, or to create tasks in it, when a customer managed key encrypts that Agent Space. This failure can happen even when the connection is Active. It occurs when the calling Agent Space can't decrypt the data of the other Agent Space, for one of the following reasons:
The constellation role of the calling Agent Space doesn't have the inline
kms:Decryptpolicy.The key policy of the encrypted Agent Space doesn't allow the account of the calling Agent Space to decrypt through AWS Ops Agent.
Do the following procedure if investigations fail to read from or create tasks in an encrypted Agent Space while the connection is Active. The procedure gives the calling Agent Space the permissions it needs to decrypt data in the encrypted Agent Space.
To resolve decryption failures
In the IAM console, open the constellation role of the calling Agent Space. Make sure that the role has the inline
kms:Decryptpolicy. If it doesn't, add the policy.In the AWS KMS console, open the customer managed key of the encrypted Agent Space. Make sure that the key policy allows the account of the calling Agent Space to decrypt through AWS Ops Agent. If it doesn't, add the grant to the key policy.
After both permissions are in place, investigations can read from and create tasks in the encrypted Agent Space.
For more information about the required policy statements, see Step 2: Add permissions for Agent Spaces encrypted with a customer managed key.
Removing a connection
A connection lets two Agent Spaces coordinate investigations. Remove a connection when the two Agent Spaces no longer need to coordinate, or when you want to revoke the access of the other Agent Space to yours. Removing a connection immediately stops coordination between the two Agent Spaces. #### To remove a connection
Open the AWS Ops Agent console.
Choose your Agent Space.
Choose the Constellations tab.
In the Connections table, select the connection that you want to remove.
Choose Disconnect, and then confirm.
The connection no longer appears in the Connections table of your Agent Space. The disconnect takes effect immediately for both Agent Spaces. The other Agent Space still lists the connection, with the status Pending, until its owner disconnects it too. To connect again, at least one side must create a new connection.
You can't change the relationship type of an existing connection. To use a different relationship type, remove the connection on both sides, and then create a new connection on both sides. For more information about creating a connection, see Connecting Agent Spaces in a constellation.
Deleting a connected Agent Space
If you delete an Agent Space that has constellation connections, its connections end, and the connected Agent Spaces can't use them again.
When you delete an Agent Space, AWS Ops Agent removes its connections. AWS Ops Agent also marks the connection as Broken in each Agent Space that was connected to it. The owner of each of those Agent Spaces can disconnect the broken connection to remove it from their list.