OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

AWS CDK unable to see role property in patterns.ScheduledFargateTask constructor

  • Thread starter Thread starter user965291
  • Start date Start date
U

user965291

Guest
I am trying to deploy aws FargateScheduledTask service using CDK python. I am unable to see the role property in the patterns.ScheduledFargateTask constructor to assign the events role. Please can you let me know what I am missing here.

Code:
    # Create schedule task
    scheduledtask = patterns.ScheduledFargateTask(
        self, "Fargate_Service",
        cluster=cluster,  # Required: Provide the cluster
        scheduled_fargate_task_definition_options=scheduled_task,
        schedule=autoscaling.Schedule.expression("cron(30 11,12 * * ? *)"),  # Required: Define the schedule
        desired_task_count=1,
        security_groups=[ecs_sg],
        **role=eventrole** ------- This one
    )
<p>I am trying to deploy aws FargateScheduledTask service using CDK python. I am unable to see the role property in the patterns.ScheduledFargateTask constructor to assign the events role. Please can you let me know what I am missing here.</p>
<pre><code> # Create schedule task
scheduledtask = patterns.ScheduledFargateTask(
self, "Fargate_Service",
cluster=cluster, # Required: Provide the cluster
scheduled_fargate_task_definition_options=scheduled_task,
schedule=autoscaling.Schedule.expression("cron(30 11,12 * * ? *)"), # Required: Define the schedule
desired_task_count=1,
security_groups=[ecs_sg],
**role=eventrole** ------- This one
)
</code></pre>
 
Top