-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling Step Function Logging To CloudWatch #12192
Comments
Cheers @ewbankkit for the quick reply! |
Now that #12128 has been merged any word on this feature? |
This looks to be implemented by #11570 |
@grahamjenson Yes, #11570 seems to address this; The only change required there is in the documentation noting that |
@ewbankkit I have submitted #12249 which is a branch off the previous PR so with the requested changes. |
By when can we expect this feature to be out?? |
Hi @DrFaust92, and @ewbankkit, what value should i pass to type and logging_configuration to step function in terraform? I can't find the information online. |
is there any step in terraform to add logging_configuration to stepfunction |
Can anyone provide an update on this issue? Any chance of an ETA? |
Plus 1 on this one, would be great to have |
I found a method in cloud formation. using that method to enable log configuration. |
I ended up using a aws stepfunctions update-state-machine \
--state-machine-arn '${state-machine-arn}' \
--logging-configuration='${logging-configuration}' \
--no-cli-pager render this json and pass it as the {
"level": "ALL",
"includeExecutionData": true,
"destinations": [
{
"cloudWatchLogsLogGroup": {
"logGroupArn": "${log-group}:*"
}
}
]
} |
Hi can you please share the approach by using Cloudwatch? Many thanks. |
Update request + 1 From the Terraform doc here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sfn_state_machine |
Also can we enable X-ray for stepfunction in Terraform? |
Hi are you using 'null_resource'? Just wondering how you specified |
@lu-liu-rft here is the working example with resource "aws_sfn_state_machine" "sfn_state_machine" {
name = "mystatemachine"
role_arn = "arn:aws:iam::1234567890:role/service-role/StepFunctions-MyStateMachine-role-a6146d54"
definition = <<EOF
{
"Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Pass",
"End": true
}
}
}
EOF
}
resource "aws_cloudwatch_log_group" "yada" {
name = "/aws/vendedlogs/states/myloggroup"
}
resource "null_resource" "enable_step_function_logging" {
triggers = {
state_machine_arn = aws_sfn_state_machine.sfn_state_machine.arn
logs_params=<<PARAMS
{
"level":"ALL",
"includeExecutionData":true,
"destinations":[
{
"cloudWatchLogsLogGroup":{
"logGroupArn":"${aws_cloudwatch_log_group.yada.arn}:*"
}
}
]
}
PARAMS
}
provisioner "local-exec" {
command = <<EOT
set -euo pipefail
aws stepfunctions update-state-machine --state-machine-arn ${self.triggers.state_machine_arn} --tracing-configuration enabled=true --logging-configuration='${self.triggers.logs_params}'
EOT
# interpreter = ["bash"]
}
} |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Description
I would like logging from Step Functions to CloudWtch logs enabled as described here https://aws.amazon.com/about-aws/whats-new/2020/02/aws-step-functions-supports-cloudwatch-logs-standard-workflows/
This should include the
log_level
,include_execution_data
,cloud_watch_log_group
optionsReferences
https://aws.amazon.com/about-aws/whats-new/2020/02/aws-step-functions-supports-cloudwatch-logs-standard-workflows/
The text was updated successfully, but these errors were encountered: