> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot AWS Onboarding Issues

> Troubleshoot failed AWS CloudFormation onboarding stacks

If onboarding fails, the AWS CloudFormation stack shows failures in the Status
column and the final status should display ROLLBACK\_COMPLETE.

Before trying to onboard your AWS account again, you must remove the
CloudFormation template, two IAM roles, and a policy created in AWS by the
template.

1. In *AWS console*, go to *CloudFormation > Stacks*.

   ![screenshot of AWS cloudformation stacks page](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-cf-stacks.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=541fafad63f1aea562805b2ae4b8c47a)

2. Select the failed stack. The default name is *aviatrix-onboard-aws*, but the
   name could have been modified.

3. In the pane that displays to the right, click the *Events* tab.

   ![screenshot of AWS cloudformation events tab](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-cf-stack-select.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=862f945f307ba840eb48e98144439ac0)

4. Scroll through the *Events* table and look for messages in the *Status
   reason* column. Examples of some root cause descriptions:

   ![screenshot of AWS cloudformation events with security group error](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-cf-status-sg.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=621c68ae224fa4d2d0e33e4ac930c139)

   ![screenshot of AWS cloudformation events with rules and policy errors](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-cf-status-rules.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=c3335c9de309853d4aa3d8b2957035d7)

5. Resolve the issues mentioned. If the problem is due to existing roles or
   policies, you will resolve those in the following steps.

6. Click *Delete* to permanently remove the failed stack.

7. Read the AWS warning and click *Delete*. Stack status changes to
   DELETE\_COMPLETE after several seconds. If you refresh the Stacks pane, the
   stack name disappears.

8. To remove the roles, go to AWS *IAM > Access Management > Roles* and select
   and delete the following:

* *aviatrix-platform-app*
* `aviatrix-role-ec2-<long-id>`

  ![screenshot of aws roles page](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-roles-delete.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=1a2da1e496fa083121985b690cd6678a)

1. To remove the policy, go to *Access Management > Policies* and then search
   for and delete the following:

* *aviatrix-platform-app-policy*

  ![screenshot of aws roles page](https://mintcdn.com/aviatrix-14b37c43/EV0VWzgSoSn4nUA6/docs/cloud/images/aws-offboard-policy-delete.png?fit=max\&auto=format\&n=EV0VWzgSoSn4nUA6\&q=85\&s=3b68a9536a7b1b4abaaf7e94c318cd1f)

You can now onboard the same account in the Aviatrix PaaS console, if you choose
to do so.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.