Charles Liu
03/16/2021, 5:44 PM@property
def _boto3_client(self): # type: ignore
from prefect.utilities.aws import get_boto_client
kwargs = self.client_options or {}
return get_boto_client(resource="codecommit", credentials=None, **kwargs)
and then the get_boto_client func:
def get_boto_client(
resource: str,
credentials: Optional[dict] = None,
region_name: Optional[str] = None,
profile_name: Optional[str] = None,
**kwargs: Any
) -> "botocore.client.BaseClient":
but it seems it holds onto None and doesn't let anything else pass.
Is there anyone else here that has successfully connected to CodeCommit through Prefect?Zanie
None
because they rely on the get_boto_client
credential behavior
if credentials:
aws_access_key = credentials["ACCESS_KEY"]
aws_secret_access_key = credentials["SECRET_ACCESS_KEY"]
aws_session_token = credentials.get("SESSION_TOKEN")
else:
ctx_credentials = prefect.context.get("secrets", {}).get("AWS_CREDENTIALS", {})
aws_access_key = ctx_credentials.get("ACCESS_KEY")
aws_secret_access_key = ctx_credentials.get("SECRET_ACCESS_KEY")
aws_session_token = ctx_credentials.get("SESSION_TOKEN")
Zanie
secrets=...
should work the same as in S3Zanie
codecommit
resource.Zanie
Charles Liu
03/16/2021, 5:56 PMCharles Liu
03/16/2021, 6:00 PMCharles Liu
03/16/2021, 6:25 PMCharles Liu
03/16/2021, 6:27 PM