Questions tagged with Amazon EventBridge

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

We are designing a asynchronous process. The flow of steps are, 1. user login in using hosted cognito login form, ui receives the idToken 2. user interacting with the form in UI - for ex: createUser 2. ui invokes REST api gateway endpoint, and sends the idToken from cognito 3. api gw validates the request with cognito using the idToken 4. after this step, we want to enrich the data and add userId and role from idToken to data. (We want to do this after the authorization step, not from ui) 5. api gw integrates with event bridge and send the command data to event bridge. Need some suggestion on the step #4. How do we able to achieve this ?
0
answers
0
votes
28
views
asked 3 months ago
An alarm has been set on our EC2 instance to auto shut if "idle" for a certain time period (based on CPU utilization). Is there a way to auto start the instance, say 5 minutes after it auto shuts due to the alarm?
4
answers
0
votes
46
views
UserAB
asked 3 months ago
The new EventBridge pipes can be used to consume stream records from DDB. If we already have a Lambda stream consumer, what would it mean to add a pipe? Would we now have two simultaneous stream consumers, or should we disable the Lambda consumer in favor of the pipe and then use Lambda as the pipe's target?
1
answers
0
votes
77
views
asked 4 months ago
I am trying to invoke a lambda function as soon as a new image is pushed to ECR. For this, I have created a lambda function and successfully tested its attached code snippet. As a trigger, I am using an EventBridge rule with the event pattern: ``` { "source": ["aws.ecr"], "detail-type": ["ECR Image Action"], "detail": { "action-type": ["PUSH"], "result": ["SUCCESS"], "repository-name": ["myrepo1", "myrepo2"], "image-tag": ["latest"] } } ``` I can see the cross reference of the rule to the lambda and vice versa. But when a new image is pushed to ECR, the rule is not triggered. According to this [post](https://aws.amazon.com/about-aws/whats-new/2019/11/ecr-events-now-published-to-eventbridge/?nc1=h_ls) this should be enough, as ECR events should be published automatically. Best regards, Sebastian
2
answers
0
votes
97
views
asked 4 months ago
**Issue Description:** When creating a schedule on the EventBridge Schedules Console that uses ECS RunTask, the schedule fails to include `launchType` in its `requestParameters` when it is set. This breaks the ability to set Assign Public IP with the error "Assign public IP is not supported for this launch type." Likely related to this issue: https://repost.aws/questions/QU7GVF66EhSjuLp04GafMKGQ/event-bridge-scheduler-fails-on-ecs-run-task-with-fargate-launch-type **Steps to Reproduce:** 1. Create a new schedule in the EventBridge Schedules console. 2. Choose ECS RunTask as the Target. 3. Under the RunTask config section, set Compute Options > Launch type to `FARGATE` 4. Set Configure Network Configuration > Auto-assign Public IP to `ENABLED` RunTask will fail with logs in CloudTrail similar to the following: ``` "errorCode": "InvalidParameterException", "errorMessage": "Assign public IP is not supported for this launch type.", "requestParameters": { "cluster": "arn:aws:ecs:XXXXX:XXXXX:cluster/XXXX", "count": 1, "enableECSManagedTags": true, "enableExecuteCommand": false, "networkConfiguration": { "awsvpcConfiguration": { "assignPublicIp": "ENABLED", "subnets": [ "subnet-XXXXX" ] } }, "overrides": {}, "placementConstraints": [], "placementStrategy": [], "platformVersion": "1.4.0", "startedBy": "chronos-schedule/XXXXX", "tags": [], "taskDefinition": "arn:aws:ecs:XXXXX:XXXXX:task-definition/XXXXX:X" }, ``` Notably, `launchType` is missing from `requestParameters` even through `assignPublicIp` was successfully set. **Workaround:** I was able to finish my desired test by [manually creating a schedule using the AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/ecs/run-task.html). Then, I had no further issue implementing the request in the actual Lambda function being developed. However, this issue was an obstacle to testing and debugging.
0
answers
0
votes
41
views
asked 4 months ago
Glue appears to have this Delay notification threshold option that sends an event. Where does this event populate? Where can I see if this even is firing or capture it so that I can send an SNS triggered email? Has anyone ever used this functionality? I have not been able to find much on the internet about it and the one Stack Overflow post about it was asking the exact same question 2 years ago, but with no response. `Apart from this you can use Glue job inbuilt "Delay notification threshold" option in which If the job runs longer than the specified time Glue will send a delay notification via CloudWatch. [1][2] --Reference: [1] https://docs.aws.amazon.com/glue/latest/dg/console-jobs.html [2] https://docs.amazonaws.cn/en_us/glue/latest/dg/automating-awsglue-with-cloudwatch-events.html`
1
answers
0
votes
68
views
asked 4 months ago
We have a Lambda Function triggered from EventBridge events. If the lambda fails it will write the records to a DLQ. What is the best practice to redrive those messages back to the lambda. Note, we can not use the built in redrive method bc that will only work with bc that is only to send the messages to another SQS queue (not a lambda). My only thought is to build a 2nd "redrive" lambda that pulls the message off the queue and sends them 1 by 1 to the original lambda. Also of note, we don't want this process to be automatic, whatever caused the failures needs to be addressed before we manually redrive the events.
1
answers
0
votes
69
views
asked 4 months ago
I am looking to use containers to run a task every hour using containers. Imagine the task takes 20 minutes, so it's not suitable for lambda, and it's not suitable for EC2, since 40 minutes out of every hour the instance would be idle. I have created a container that runs one simple task, (writes a row into a database) then stops. I created a docker container, pushed this to ECR, then created an ECS task that appears to run the task constantly (starting / restarting). I set the number of tasks to 0 for the cluster to stop this behaviour. I then created a schedule using AWS event bridge, and set it to run the task every hour, but it's not running at all. Can anyone suggest something that I should look at to achieve the desired scheduled task?
1
answers
0
votes
62
views
profile picture
asked 4 months ago
Has anyone found where Amazon Connect historical and real-time reports are stored, S3 or otherwise? For example, I have a historical report for agents status that runs every 30 minutes, and stores what state the agent was in i.e. available, after call for every 30 minutes. This is exactly what I want in Athena to build an every 30 minute query. However, currently my reporting is based on CTR and agent status changes via Kinesis and Quicksight into Athena, meaning I can't build a report every 30 minutes if say in a 2hr block four agents were online yet no calls came in and they never changed their status. Yet, in my historical report that data is there, but I don't see an S3 bucket where this is stored. John
2
answers
0
votes
89
views
asked 4 months ago
Hi, I am using a Cloudformation SAM template to create a Serverless Lambda function and attach a Schedule (see example below). This creates a Lambda function and EventBridge rule resource successfully. Adding tags for the Lambda function is fine. But I am struggling to work out how to add any tags to the EventBridge rule through this template (either custom tags or CloudFormation stack tags). Does anyone know whether it is actually possible to add tags for an EventBridge rule via a SAM template? Thanks! ``` Resources: myServerlessFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/sample/ Handler: sample.lambdahandler Runtime: nodejs16.x Architectures: - x86_64 MemorySize: 128 Timeout: 100 FunctionName: 'samplefunction' Description: A sample lambda function. Policies: - AWSLambdaBasicExecutionRole Tags: Env: dev Events: ScheduledFunction: Type: Schedule Properties: Name: 'sampleschedule' Schedule: rate(1 day) ```
1
answers
0
votes
489
views
asked 4 months ago
I run the application in private ec2 with No NAT Gateway. this application has health check api. In this situation, I want to call health check api with EventBridge and Lambda. and Lambda sends data to another application(On Internet) but Lambda in private subnet can't send data to the application. How can I solve this problem?
1
answers
0
votes
114
views
asked 4 months ago
Hi, When defining the Compute Options on a RunTask call with: Launch type - "FARGATE", Platform Version: "1.4.0" - it seems that only the Platform Version is passed onto the "requestParameters" thus triggering the following error message: "The platform version must be null when specifying an EC2 launch type." Screenshot from Eventbridge Scheduler: ![Enter image description here](/media/postImages/original/IMT22IN3dkSjO5kKtwwyHOGw) Screenshot from the output in CloudTrail: ![Enter image description here](/media/postImages/original/IMqOGxKg7LQ9Klj_FXO3ZbdA) I have successfully triggered and run this task from an EventBridge rule
1
answers
1
votes
143
views
asked 4 months ago