Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow order of execution to be determined by "DependsOn" param of CloudfFormation

Open
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, ruby

Research direction

Start in /lib/cfn_manage/cf_start_stop_environment.rb, especially resource_start_priorities, and trace how the CloudFormation stack resources are ordered. Investigate how DependsOn values can be traversed and mapped to startup order. Done means specified dependencies are honored instead of relying only on fixed service-type priorities.

Written by the indexing model from the issue text.

Description

cfn-manage enhancement

We have identified an issue with dependencies and startup order.

ISSUE:
One of our EC2 instances requires that a Container in ECS is fully available at the time of its startup/provisioning stage. From my understanding, the execution order is hardcoded in /lib/cfn_manage/cf_start_stop_environment.rb by "resource_start_priorities". Currently, EC2 instances start first, and THEN ECS instances... I suspect this is because the ECS startup will fail if the respective EC2 servers hosting Containers are not available first..? Regardless, this is causing issues for us since we must have one of our EC2 instances spin up only AFTER a specific ECS Container is fully available.

PROPOSED CHANGE:

Could you please consider traversing the Cloudformation Stack to compile a map of dependencies based on any "DependsOn" parameters of resources. Then, you could modify the execution order based on this mapping. This will ensure that any specified dependencies in the Stack are honoured, instead of following a fixed execution order based on service type.

TEMP WORKAROUND UNTIL FIXED:
Currently, we are using a temp workaround of invoking EC2 API commands after the cfn_manage execution to terminate the instances which have a dependency on ECS containers. Then, the ASG will spin up new instances shortly after this termination, thus having those instances with dependencies be created AFTER ECS is finished starting up.

Thank you for the open-source resource!

Dominant language
Ruby
Stars
11
Forks
14
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from base2Services/cfn-start-stop-stack

All issues in base2Services/cfn-start-stop-stack

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.