I am trying to replace the input with a variable based on user input (function_name). I tried replace but list does not allow that. Any other way to go about replacing this ?
function_name = sys.argv[1]
payload = [
{
'definition': {
'type': 'query_value',
'requests': [
{'q': 'avg:aws.lambda.duration.p50{resource:input}'}
],
'title': 'p50',
'title_size': '16'
}
},
{
'definition': {
'type': 'query_value',
'requests': [
{'q': 'avg:aws.lambda.duration.p80{resource:input}'}
],
'title': 'p80'
}
}
]