Skip to main content

Environment creation

In this article we can go through troubleshoot steps for most commonly faced issues during App Environment creation and deletion.

1. Invalid AWS credentials

To create an App Environment we need to create a Connection first with the AWS credentials i.e. "Access key ID" and "Secret access key". If the AWS credentials are wrong then you will get AWS Authentication errors in the App Environment operation.

To fix this issue, you can update the credentials with the correct credentials copy pasted from AWS. You can refer this article to know how to get AWS credentials.

2. Insufficient AWS permission

If the provided AWS user credentials lack the necessary permissions required for LocalOps to create an App Environment, you will encounter AWS Forbidden/Not Allowed errors during App Environment operations.

To resolve this, ensure that the AWS IAM user associated with the configured AWS credentials has a policy with all the required permissions listed in this article. You can copy and paste the Policy JSON into the associated IAM Policy, save it, and then retry the App Environment operation.

3. Resource already exists

If the AWS resource that the App Environment tries to create already exists in the AWS account then App Environment operation will throw error saying Resource already exists.

If the existing AWS resource is not used then you can delete it and retry App Environment operation.

4. Infra limit reached

AWS imposes limits on the number of certain resource types that can be created. For example, by default, only 5 Elastic IPs (EIPs) are allowed per AWS account per region. If this limit is reached, the App Environment operation may fail with an error indicating that the maximum allowed limit has been reached.

To resolve this issue, you can either clean up unused resources in your AWS account or contact AWS Support to request an increase in the resource limit, explaining your use case.

5. Creation Issues

When creating an App Environment, two operations are initiated: one for creating the necessary infrastructure resources and another for installing the application and its required infrastructure.

1. Infrastructure Creation Failure

If the first step, which involves creating infrastructure resources, fails, you can check the operation logs to understand the cause of the failure. Take appropriate actions based on the logs and retry the operation to resolve the issue. Sometimes, infrastructure creation failures may occur due to temporary issues on the AWS side. Retrying the operation often resolves such issues.

2. Application Installation Failure

Similarly, if the second operation, involving application installation, fails, review the operation logs for details on why the failure occurred. Address any identified issues and retry the operation to see if it resolves the problem.

6. Deletion Issues

During App Environment deletion, you may encounter errors related to AWS resources not being deleted. This can occur if dependent resources are not yet deleted. While AWS typically handles cascading deletes automatically, there are cases where this process fails, leaving dangling resources that prevent deletion of the App Environment.

In such situations, manually delete the resources from your AWS console and retry the deletion operation. Sometimes, delays or glitches from AWS can also contribute to deletion failures. Retrying the deletion operation usually resolves these issues.

You may also encounter deletion issues if the system fails to delete cloud dependencies created by your application, such as S3 buckets, etc. For instance, an S3 bucket cannot be deleted until its contents are removed. In such cases, you may need to implement a Kubernetes Job triggered during Helm uninstallation to delete the contents of the S3 bucket created by your application. This ensures that all necessary cleanup steps are performed before attempting to delete the associated resources.

tip

To ensure all resources are properly deleted, use the provided App Environment tags to filter AWS resources and confirm their removal. This helps maintain a clean and efficient AWS environment.