Hi team, I need help I want to install boto3 to co...
# flyte-support
n
Hi team, I need help I want to install boto3 to connect to AWS from my flyte sandbox environment running locally I tried adding the boto3 python package in the ImageSpec in my workflow but when I register the workflow it does not install it inside the container and the workflow fails. Any support for this? below is the code: and the command I used to register the workflow is: pyflyte register workflows/aws_identity.py --project flytesnacks --domain development Code: from flytekit import task, workflow, ImageSpec image_spec = ImageSpec( packages=["boto3", "pandas"], registry="ghcr.io/flyteorg", ) if image_spec.is_container(): import boto3 @task(container_image="image_spec") def whoami() -> str: import boto3 client = boto3.client("sts") identity = client.get_caller_identity() return f"Hello from account: {identity['Account']} as {identity['Arn']}" @workflow def identity_wf() -> str: return whoami()
g
registry="ghcr.io/flyteorg",
Unless you have access to flyte's GH image registry, the value for
registry
should generally be your private container registry (either locally or in your AWS account)
@task(container_image="image_spec")
Also remove the quotes as you want to pass the variable here.
n
Thank you for the quick response! Let me try it out
c
@numerous-pizza-94528 did the above work for you?