bulky-portugal-95315
01/05/2023, 4:48 PMhello step and am able to reach the job queue, but subsequently i fall into a Data store error: No completed attempts of the task was found for task 'HelloAWSFlow/{id}/start/1' and the task fails on the start step. I haven’t gotten to running the metadata on service yet, so my current execution call is as below
python 05-helloaws/helloaws.py --with batch --datastore=s3 --metadata=local run any insight is hugely appreciated. thank you!straight-shampoo-11124
01/05/2023, 8:45 PM--with batch)?bulky-portugal-95315
01/06/2023, 12:22 AMpython 05-helloaws/helloaws.py --datastore=s3 --metadata=local run) executes the start step without issues, but the hello step that uses the @batch decorator fails with the same error. I believe this is related to a error using S3 as the datastore, but i have provided full permissions to my current AWS role to the S3 bucket I created.bulky-portugal-95315
01/06/2023, 12:41 AMbulky-portugal-95315
01/06/2023, 12:42 AM--with batch gives me the same error in the start stepvictorious-lawyer-58417
01/06/2023, 7:42 AM@batch fails to load data from S3. Containers launched by Batch use a separate IAM role.
You said you use AWS CDK v2 currently - have you tried it with our standard Terraform/Cloudformation templates which should set up the roles correctly?bulky-portugal-95315
01/06/2023, 4:10 PMstraight-shampoo-11124
01/06/2023, 8:54 PMbulky-portugal-95315
01/09/2023, 6:49 PMbulky-portugal-95315
01/09/2023, 10:58 PMmetaflowbatchs3taskrole68AA1286) and execution role (metaflowbatchserviceroleE707E0E1), I’ve also attached the cdk synth yaml output for these roles below to match with the metaflow reference yaml from the Outerbounds site.
metaflowbatchs3taskrole68AA1286:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: <http://ecs-tasks.amazonaws.com|ecs-tasks.amazonaws.com>
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/AWSXRayDaemonWriteAccess
Policies:
- PolicyDocument:
Statement:
- Action: s3:ListBucket
Effect: Allow
Resource: arn:aws:s3:::*
Sid: BucketAccessBatch
Version: "2012-10-17"
PolicyName: CustomS3ListBatch
- PolicyDocument:
Statement:
- Action:
- s3:PutObject
- s3:GetObject
- s3:DeleteObject
Effect: Allow
Resource:
- arn:aws:s3:::*
- arn:aws:s3:::*/
Sid: ObjectAccessBatch
Version: "2012-10-17"
PolicyName: CustomS3Batch
- PolicyDocument:
Statement:
- Action:
- sagemaker:CreateTrainingJob
- sagemaker:DescribeTrainingJob
Effect: Allow
Resource:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":sagemaker:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- :*
Sid: AllowSagemakerCreateDescribe
- Action:
- sagemaker:CreateModel
- sagemaker:CreateEndpointConfig
- sagemaker:CreateEndpoint
- sagemaker:DescribeModel
- sagemaker:DescribeEndpoint
- sagemaker:InvokeEndpoint
Effect: Allow
Resource:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":sagemaker:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- :*
Sid: AllowSagemakerDeploy
Version: "2012-10-17"
PolicyName: AllowSageMaker
- PolicyDocument:
Statement:
- Action: iam:PassRole
Condition:
StringEquals:
iam:PassedToService: <http://sagemaker.amazonaws.com|sagemaker.amazonaws.com>
Effect: Allow
Resource: "*"
Sid: AllowPassRole
Version: "2012-10-17"
PolicyName: IAM_PASS_ROLE
- PolicyDocument:
Statement:
- Action:
- dynamodb:PutItem
- dynamodb:GetItem
- dynamodb:UpdateItem
Effect: Allow
Resource:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":dynamodb:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- :metaflow/
Sid: items
Version: "2012-10-17"
PolicyName: DynamoDB
- PolicyDocument:
Statement:
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource: "*"
Sid: AllowPutLogs
Version: "2012-10-17"
PolicyName: Cloudwatch
RoleName: metaflow-stackBatchS3TaskRole
Metadata:
aws:cdk:path: metaflow-stack/metaflow-batch-s3-task-role/Resource
metaflowbatchserviceroleE707E0E1:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: <http://batch.amazonaws.com|batch.amazonaws.com>
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSBatchServiceRole
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/AWSXRayDaemonWriteAccess
Path: /
Policies:
- PolicyDocument:
Statement:
- Action: iam:PassRole
Condition:
StringEquals:
iam:PassedToService:
- <http://ec2.amazonaws.com|ec2.amazonaws.com>
- <http://ecs-tasks.amazonaws.com|ecs-tasks.amazonaws.com>
Effect: Allow
Resource: "*"
Sid: VisualEditor0
Version: "2012-10-17"
PolicyName: IAM_PASS_ROLE
- PolicyDocument:
Statement:
- Action: iam:CreateServiceLinkedRole
Condition:
StringEquals:
iam:AWSServiceName:
- <http://ecs.amazonaws.com|ecs.amazonaws.com>
- <http://autoscaling.amazonaws.com|autoscaling.amazonaws.com>
Effect: Allow
Resource: "*"
Sid: VisualEditor3
Version: "2012-10-17"
PolicyName: iam_custom_policies
- PolicyDocument:
Statement:
- Action: ec2:CreateTags
Condition:
StringEquals:
ec2:CreateAction: RunInstances
Effect: Allow
Resource: "*"
Sid: VisualEditor4
Version: "2012-10-17"
PolicyName: ec2_custom_policies
RoleName: metaflow-stackBatchServiceRole
Metadata:
aws:cdk:path: metaflow-stack/metaflow-batch-service-role/Resourcebulky-portugal-95315
01/09/2023, 11:00 PMbulky-portugal-95315
01/09/2023, 11:00 PMvictorious-lawyer-58417
01/09/2023, 11:03 PMbulky-portugal-95315
01/09/2023, 11:04 PMvictorious-lawyer-58417
01/09/2023, 11:05 PM--metadata=local as you have been doingbulky-portugal-95315
01/09/2023, 11:08 PMbulky-portugal-95315
01/09/2023, 11:21 PMResource handler returned message: "Invalid request provided: CreateService error: The target group with targetGroupArn arn:aws:elasticloadbalancing:us-east-1:372645068752:targetgroup/metafl-NLBTa-6BOG8J5PQMLD/b9f4d662ce37e333 does not have an associated load balancer. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException; Request ID: 7884e683-6e8d-4f0c-ba90-3be19c327990; Proxy: null)" (RequestToken: 21d04f78-9aa6-02bb-9ce5-ae7ab6d02484, HandlerErrorCode: InvalidRequest)victorious-lawyer-58417
01/09/2023, 11:36 PMbulky-portugal-95315
01/09/2023, 11:38 PMbulky-portugal-95315
01/09/2023, 11:38 PMvictorious-lawyer-58417
01/09/2023, 11:53 PMvictorious-lawyer-58417
01/09/2023, 11:54 PMbulky-portugal-95315
01/10/2023, 3:29 PMbulky-portugal-95315
01/10/2023, 3:37 PMData store error failure, i attached the cfn yaml i deployed for reference, but i am pretty sure the removals were minimalbulky-portugal-95315
01/10/2023, 3:38 PMvictorious-lawyer-58417
01/10/2023, 5:16 PMbulky-portugal-95315
01/10/2023, 5:28 PMbulky-portugal-95315
01/10/2023, 5:32 PMbulky-portugal-95315
01/10/2023, 5:32 PMbulky-portugal-95315
01/10/2023, 5:33 PMbulky-portugal-95315
01/10/2023, 5:33 PMbulky-portugal-95315
01/10/2023, 6:35 PMbulky-portugal-95315
01/10/2023, 6:35 PMbulky-portugal-95315
01/10/2023, 6:35 PMbulky-portugal-95315
01/10/2023, 6:35 PMbulky-portugal-95315
01/10/2023, 6:36 PMNo completed attempts of the task was found for task 'HelloAWSFlow/1673375328209195/hello/2', is it looking for a file in particular that should be generated? i am feeling like this might not be an s3 issue but an execution of the step in batch issuebulky-portugal-95315
01/10/2023, 6:45 PMexec /bin/bash: exec format *error* which i’m not 100% what the exec error is related tobulky-portugal-95315
01/10/2023, 6:50 PMbulky-portugal-95315
01/10/2023, 6:51 PMvictorious-lawyer-58417
01/10/2023, 6:55 PMvictorious-lawyer-58417
01/10/2023, 6:55 PMbulky-portugal-95315
01/10/2023, 6:55 PMbulky-portugal-95315
01/10/2023, 6:56 PMbulky-portugal-95315
01/11/2023, 11:35 PM--metadata=local the execution runs fine and i see the data being created for the runs in s3, but when i change it to --metadata=service, it doesn’t run at all, any ideas? the stack is pretty much identical to the cloudformation yaml, so not really sure where to begin, api gateway? nlb?straight-shampoo-11124
01/12/2023, 3:39 AMstraight-shampoo-11124
01/12/2023, 3:40 AM--metadata=service you need a few pieces in place:
• Metaflow service deployed on ECS
• RDS where the service stores its data
• Proper VPC setup so all parts can talk to each other
If you use our cloudformation/terraform templates, all these pieces will get set up automaticallystraight-shampoo-11124
01/12/2023, 3:40 AMbulky-portugal-95315
01/12/2023, 3:56 PMnetflixoss/metaflow_metadata_service imagebulky-portugal-95315
01/12/2023, 3:56 PMbulky-portugal-95315
01/12/2023, 3:57 PMbulky-portugal-95315
01/12/2023, 3:58 PMbulky-portugal-95315
01/12/2023, 4:02 PM"METAFLOW_SERVICE_INTERNAL_URL": "<http://metaf-metaf-1RRPUVW2887Z1-4b6250904057ed29.elb.us-east-1.amazonaws.com/>",
"METAFLOW_SERVICE_URL": "<http://metaf-metaf-1RRPUVW2887Z1-4b6250904057ed29.elb.us-east-1.amazonaws.com/api>",bulky-portugal-95315
01/12/2023, 4:17 PM{publicip}:8080 and that seems to have worked perfectly and the helloaws flow ran without issues. For some reason I cannot connect to it through the elb url as above or the private ip, so some networking to be figured out. i think one part i wasn’t totally familiar with was the API gateway, what does the APIGW service with regard to metaflow?