Kelvin DeCosta
02/14/2023, 7:10 AMNikhil Jain
02/15/2023, 8:27 PMSubmission failed. botocore.exceptions.ParamValidationError: Parameter validation failed: Unknown parameter in input: "deregisteredAt", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform
In the past I got this error when prefect_api_key
or prefect_api_url
was missing, but that is not the case anymore because the same flow/deployment runs fine other times.Max Jackson
02/27/2023, 4:39 PMRyan Peden
02/27/2023, 4:48 PM{
"taskType": "prefect-agent"
}
Ryan Peden
02/27/2023, 4:48 PMMax Jackson
02/27/2023, 6:40 PMprefect deployment build flows/first_flow.py:hi -n dev -q dev -ib ecs/first-ecs-test -sb s3/first-flow -a
I get the attached error. am I using this block properly?Ethan Veres
03/03/2023, 2:00 PMwonsun
03/06/2023, 7:05 AMimport boto3
from prefect_aws import AwsCredentials
@flow
def check_conndition():
ac_block = AwsCredentials.load('my_block')
s3 = boto3.resource('s3', aws_access_key_id=ac_block.aws_access_key_id, aws_secret_access_key=ac_block.aws_secret_access_key)
bucket = s3.Bucket('my_existing_bucket')
obj_list = []
for obj_summary in bucket.objects.all(): #error occurring point
obj_list.append(obj_summary.key)
if __name__=='__main__':
check_condition()
Samuel Hinton
03/06/2023, 12:07 PMstream_output
flag?
Ive got _stream_output_=True
and _configure_cloudwatch_logs_=True
. The cloudwatch logs look fine (see the screenshot), but the stream_output flag doesnt seem to do anything. Im running the simple command=["echo", "hello world"],
example right from the docs too, nothing fancy going on.
I can confirm it has access to all three logs:CreateLogStream, logs:CreateLogGroup, and logs:PutLogEvents permissions, but the logs never actually appear in the prefect flows logs, which was what I was expecting. Does anyone know what I’m missing?Peter T
03/06/2023, 1:12 PMEthan Veres
03/06/2023, 3:57 PMprefect_aws.ecs.TaskFailedToStart: ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secret from asm: service call has been retried 5 time(s): failed to fetch secret arn:aws:secretsmanager:XXXXXXXX from secrets manager: RequestCanceled: request context canceled caused by: context deadline exceeded
File "/usr/local/lib/python3.10/site-packages/prefect_aws/ecs.py", line 1058, in _wait_for_task_start
I’ve gone through and made sure that the ecs service has:
1. Public IP assigned
2. Public subnets
3. Egress security group that allows all traffic
Anything that I missed?Ethan Veres
03/06/2023, 3:58 PMEthan Veres
03/06/2023, 10:24 PMVasco Leitão
03/09/2023, 10:37 AMMarcos
03/14/2023, 10:48 AMprefect-agent
container, the agent downloads the content of an S3 Block with flows for a deployment?Ethan Veres
03/14/2023, 3:06 PMChristian Becker
03/16/2023, 8:30 AMMax Jackson
03/16/2023, 2:56 PMprefect deployment build flows/ecs-test-flow.py:main -n dev -q dev -ib ecs-task/first-ecs-test -sb s3/first-flow -a
I have also tried just using the generic -i ecs-task
when deploying my flows, to no avail. In either case I get 'Submission failed. KeyError: "No class found for dispatch key 'ecs-task' in registry for type 'Block'.' when trying to create a quick run of the flow.
Am I going about this wrong? How can I reliably deploy my flows to ECS?Mike Grabbe
03/16/2023, 3:45 PMChristian Becker
03/17/2023, 9:23 AMJoshua Grant
03/17/2023, 4:09 PMBraun Reyes
03/28/2023, 9:24 PMtask_definition={
"containerDefinitions": [
{
"secrets": [
{
"name": i.envar_name,
"valueFrom": f"arn:aws:secretsmanager:{AWS_REGION}:{account_id}:secret:{i.secret_name}",
}
for i in self.secrets
],
"name": slugified_flow_name,
"image": image_name
}
],
"ephemeralStorage": {"sizeInGiB": self.ephemeral_storage_gb},
}
Mark NS
03/29/2023, 11:26 AMJames Gatter
04/04/2023, 3:59 PMtask_customizations
field of ECSTask()
, but it seems like the fields I want to modify (`volumes`/`mountPoints`) are unsupported (see thread).Braun Reyes
04/04/2023, 5:42 PMprefect deployment build example_flow.py:flow_1 -n base -sb s3/common-utils-dev-test/flow-group-1/flow-1 -ib ecs-task/common-utils-flow-1-dev-test --override 'task_customizations=[{"op": "replace", "path": "/overrides/cpu", "value": "512"}, {"op": "replace", "path": "/overrides/memory", "value": "1024"}]' -q prefect-v2-queue-dev-test -v dev --params '{"param_name": "param_value"}' -t common-utils -t flow-group-1 -a --cron '0 0 * * *'
It results in this infra override in deployments
{
"task_customizations": "[{\"op\": \"replace\", \"path\": \"/overrides/cpu\", \"value\": \"512\"}, {\"op\": \"replace\", \"path\": \"/overrides/memory\", \"value\": \"1024\"}]"
}
however when I submit the flow run I get this error
Submission failed. pydantic.error_wrappers.ValidationError: 1 validation error for ECSTask task_customizations instance of JsonPatch expected (type=type_error.arbitrary_type; expected_arbitrary_type=JsonPatch)
anyone know why this would not work.Braun Reyes
04/04/2023, 10:11 PM@pytest.mark.usefixtures("ecs_mocks")
async def test_task_customizations_as_string(aws_credentials):
task = ECSTask(
aws_credentials=aws_credentials,
memory=512,
cpu=256,
task_customizations='[{"op": "replace", "path": "/overrides/cpu", "value": "512"}, {"op": "replace", "path": "/overrides/memory", "value": "1024"}]',
) # type: ignore
original_run_task = task._run_task
mock_run_task = MagicMock(side_effect=original_run_task)
task._run_task = mock_run_task
await run_then_stop_task(task)
overrides = mock_run_task.call_args[0][1].get("overrides")
assert overrides["memory"] == "1024"
assert overrides["cpu"] == "512"
Amit Mukherjee
04/11/2023, 7:30 PMDylan
04/13/2023, 10:42 AMAndy Dienes
04/13/2023, 1:43 PMListObjects: permission denied
) https://github.com/PrefectHQ/prefect/issues/9188
it's quite a painful one since it appears to happen very randomly and i have no idea how to get around itAndy Dienes
04/13/2023, 1:43 PM