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)
Thank you for your reply Vinoopal. I suspect your assumption here is most likely correct. Perhaps this functionality will be available for SAM templates in the future.