Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Handling when Create EC2 call fails #6

Open
dheerajoruganty opened this issue Sep 30, 2024 · 0 comments
Open

Add Handling when Create EC2 call fails #6

dheerajoruganty opened this issue Sep 30, 2024 · 0 comments

Comments

@dheerajoruganty
Copy link
Collaborator

dheerajoruganty commented Sep 30, 2024

Description:

When making an API call to create an EC2 instance, the request may fail due to various reasons such as:

  • Invalid configuration passed to the API (e.g., incorrect instance type, missing parameters, etc.)
  • Service quotas or limits being reached (e.g., number of instances, VPC limits, etc.)
  • AWS region-specific issues

Currently, there is no error handling mechanism in place to gracefully handle such failures. If an instance creation request fails, it causes the process to stop unexpectedly. We need to implement error handling logic to skip the failed instance creation attempt and proceed to the next one.

Steps to Reproduce:

  1. Call the EC2 API with invalid or incorrect parameters.
  2. If a service quota limit is reached, the process halts with an error message.

Expected Behavior:

  • When the API call fails, the failure should be caught, logged, and skipped.
  • The process should continue attempting to create subsequent instances, instead of stopping on the first failure.

Possible Solutions:

  • Implement error handling for the EC2 instance creation API call.
  • On failure, log the error message and skip the failed attempt.
  • Ensure the script proceeds with the next instance creation request in the list.

Relevant Code/Section:

Add error handling in the code section responsible for making EC2 instance creation API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant