This parameters template demonstrates the Put EventBridge/CloudWatch Events action: If a parameter within the JSON formatted parameters template is a JSON structure in itself (e.g. the Lambda function payload), it needs to be escaped before adding it as a value - this has two implications: custom content needs to be escaped, which can be achieved by Composing action payloads with utility functions, specifically the $util.escapeJson() function variables with conflicting content (e.g. multi line variables like JIRA's This is an opinionated example that works well for ingesting custom events from Atlassian products – refer to Event Patterns in CloudWatch Events for details on these and other available fields. Put EventBridge/CloudWatch Events parameters example - Bamboo Build Task Execution (escaped with utility function)JSON escaping requirements
$issue.fields.description
or Bamboo's $notification.textEmailContent
or JSON structures retrieved via JSONPath) need to be escaped twice, via $util.escapeJson($util.escapeJson(...))
- we are exploring options on how to make this easier in a future releaseEvent Patterns in CloudWatch Events
Put EventBridge/CloudWatch Events parameters example - Bamboo Build Task Execution (escaped manually){
"Entries": [
{
"Time": "$event.timestamp",
"Source": "net.utoolity.atlassian.bamboo.automation-with-aws-bamboo",
"DetailType": "Bamboo Build Task Execution",
"Detail": "{ \"agentId\": \"${bamboo.agentId}\", \"buildResultKey\": \"${bamboo.buildResultKey}\", \"resultsUrl\": \"${bamboo.resultsUrl}\" }"
}
]
}
{
"Entries": [
{
"Time": "$event.timestamp",
"Source": "net.utoolity.atlassian.bamboo.automation-with-aws-bamboo",
"DetailType": "Bamboo Build Task Execution",
"Detail": "$util.escapeJson('{
"agentId": "${bamboo.agentId}",
"buildResultKey": "${bamboo.buildResultKey}",
"resultsUrl": "${bamboo.resultsUrl}"
}')"
}
]
}
Skip to end of banner
Go to start of banner
Put EventBridge/CloudWatch Events - Bamboo Build Task Execution
Manage space
Manage content
Integrations