Traceback (most recent call last):
File "/usr/local/bin/ecs-compose-x", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/ecs_composex/cli.py", line 171, in main
root_stack = generate_full_template(settings)
File "/usr/local/lib/python3.9/site-packages/ecs_composex/ecs_composex.py", line 664, in generate_full_template
apply_x_configs_to_ecs(
File "/usr/local/lib/python3.9/site-packages/ecs_composex/ecs_composex.py", line 199, in apply_x_configs_to_ecs
invoke_x_to_ecs(None, root_stack, resource_stack, settings)
File "/usr/local/lib/python3.9/site-packages/ecs_composex/ecs_composex.py", line 173, in invoke_x_to_ecs
ecs_function(
File "/usr/local/lib/python3.9/site-packages/ecs_composex/events/events_ecs.py", line 235, in events_to_ecs
define_service_targets(settings, res_root_stack, rule, cluster_arn)
File "/usr/local/lib/python3.9/site-packages/ecs_composex/events/events_ecs.py", line 126, in define_service_targets
service[0].template.add_resource(
File "/usr/local/lib/python3.9/site-packages/troposphere/__init__.py", line 689, in add_resource
return self._update(self.resources, resource)
File "/usr/local/lib/python3.9/site-packages/troposphere/__init__.py", line 658, in _update
self.handle_duplicate_key(values.title)
File "/usr/local/lib/python3.9/site-packages/troposphere/__init__.py", line 648, in handle_duplicate_key
raise ValueError('duplicate key "%s" detected' % key)
ValueError: duplicate key "EventsAccessPolicy" detected
I have noticed that the Policy name is hard-coded to "EventsAccess". We may be able to resolve if we remove the hard-coding.
Expected behavior
The cloud formation template should generate as expected with the event rules for the service.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Use-case, I need to trigger a task twice a day - one at 8am and other at 8pm. I've used the following:
I was getting the following error:
I have noticed that the Policy name is hard-coded to "EventsAccess". We may be able to resolve if we remove the hard-coding.
Expected behavior The cloud formation template should generate as expected with the event rules for the service.