-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
push_project_to_s3
is not working with credentials stored in a prefect block
#13038
Comments
push_project_to_s3
is not working with credentials stored in a Blockpush_project_to_s3
is not working with credentials stored in a prefect block
I am getting the same error. {'aws_access_key_id': 'xxxXXXxxx', 'aws_secret_access_key': 'xxxXXXXxxxXXXxxx', 'aws_session_token': None, 'profile_name': None, 'region_name': 'ap-northeast-2', 'aws_client_parameters': { 'api_version': None, 'use_ssl': True, 'verify': True, 'verify_cert_path': None, 'endpoint_url': None, 'config': None}} And when I executed the code below I get the following error because of the arguments profile_name, aws_client_parameters, which are not required by boto3.client. If you temporarily remove the unnecessary fields as shown below, the deployment will be successful. But when I run the flow, I get the same error in pull_project_from_s3 :) Additionally, it would be nice to have a way to authenticate via s3 block. |
Also encountering this. Temporary workaround is to create Secret(value=...).save('deploy-s3-access-key', overwrite=True)
Secret(value=...).save('deploy-s3-secret-key', overwrite=True)
Secret(value=...).save('deploy-s3-endpoint', overwrite=True) # prefect.yaml
push: # same thing for pull
- prefect_aws.projects.steps.push_project_to_s3:
# ...
credentials:
aws_access_key_id: "{{ prefect.blocks.secret.deploy-s3-access-key }}"
aws_secret_access_key: "{{ prefect.blocks.secret.deploy-s3-secret-key }}"
client_parameters:
endpoint_url: "{{ prefect.blocks.secret.deploy-s3-endpoint }}" |
This is potentially fixed by PrefectHQ/prefect-aws#322 |
I've created a new project using the docker-s3 template. The credentials of my AWS service account are stored in a prefect block. According to the prefect project tutorial, this is the recommended setup. This is the push section in my deployment.yaml :
When initiating a deploy via
prefect deploy --name ...
, the step fails withTypeError: Session.client() got an unexpected keyword argument 'profile_name'
Expectation / Proposal
Using credentials stored in a prefect blocks works. Even better, I can use a prefect s3 block directly.
Traceback / Example
The text was updated successfully, but these errors were encountered: