https://dagster.io/ logo
#dagster-cloud
Title
# dagster-cloud
p

Pierre Pasquet

02/29/2024, 8:38 PM
very (very) confused by the way to configure hybrid deployment with AWS ECS. I have my own image that I have pushed to my AWS ECR. It is very unclear how I should link that image to my dagster code location. What is the difference between
image: dagster/dagster-cloud-examples:latest
and
Copy code
server_sidecar_containers:
          - name: DatadogAgent
            image: public.ecr.aws/datadog/agent:latest
            environment:
              - name: ECS_FARGATE
                value: true
run_sidecar_containers:
    - name: DatadogAgent
      image: public.ecr.aws/datadog/agent:latest
      environment:
          - name: ECS_FARGATE
          value: true
🤖 1
Copy code
Error: Some locations failed to load after being synced by the agent:
Error loading paces-etl: {'__typename': 'PythonError', 'message': 'Exception: Invalid image <http://XXXX.dkr.ecr.us-east-2.amazonaws.com/dagster-etl:latest|XXXX.dkr.ecr.us-east-2.amazonaws.com/dagster-etl:latest>. Only images managed by Dagster Cloud can be used in Serverless deployments.\n', 'stack': ['  File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1386, in _reconcile\n    self._check_for_image(code_deployment_metadata)\n', '  File "/dagster-cloud-serverless-agent/dagster_cloud_serverless_agent/serverless/user_code_launcher.py", line 122, in _check_for_image\n    raise Exception(\n']}
this is the result of launching
dagster-cloud workspace sync -w dagster_cloud.yaml
d

daniel

02/29/2024, 9:29 PM
Hi Pierre - this error makes me think that Dagster believes that your org is still using Serverless, not Hybrid - if you share your organization name we can take a look and verify, but you can switch between Serverless and Hybrid on the Deployment => Agents tab here:
p

Pierre Pasquet

02/29/2024, 9:30 PM
yes that was it 🙂
thanks
d

daniel

02/29/2024, 9:30 PM
Sidecar containers are containers that run in addition to the main one running your Dagster code - I wouldn't expect you to need any sidecars to start
👍 1
But if you want to add, say, a datadog sidecar in the future, that's where you'd configure it
p

Pierre Pasquet

02/29/2024, 9:31 PM
so in hybrid, i need to link my own image in the
image:
field?
say, from a private ECR ?
d

daniel

02/29/2024, 9:31 PM
That's right
a lot of times that is set automatically via CI/CD and built on each push to your code repo, there's a guide to doing that here: https://docs.dagster.io/dagster-cloud/getting-started#step-4-configure-cicd-for-your-project
p

Pierre Pasquet

02/29/2024, 9:51 PM
still facing error when deploying the code location. This is a recurring error in my "main" task
Copy code
2024-02-29 21:43:32 +0000 - dagster_cloud.user_code_launcher - ERROR - Unable to update prod:paces-etl. Updating location with error data: dagster_cloud.workspace.ecs.client.EcsServiceError: ECS service failed because task arn:aws:ecs:us-east-2:089820091254:task/Dagster-Cloud-paces-prod-Cluster/7f257cbd343942de8506d4bbce71c46a failed: Essential container in task exited
d

daniel

02/29/2024, 9:51 PM
are you able to pull logs from the task in ECS?
p

Pierre Pasquet

02/29/2024, 9:52 PM
when i open any of my tasks with task definition
server_paces_prod_paces-etl_be48780f:4
i get a single log message
exec /usr/local/bin/dagster: exec format error
^ yes those are coming from Cloudwatch
d

daniel

02/29/2024, 9:52 PM
Did you build the image on an M1/M2 mac? Try rebuilding it with
--platform linux/amd64
p

Pierre Pasquet

02/29/2024, 9:52 PM
ah! ok will try
and then republish it on ecr?
d

daniel

02/29/2024, 9:53 PM
YEah
5 Views