How to use the aioboto3.client function in aioboto3

To help you get started, we’ve selected a few aioboto3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github awslabs / sagemaker-debugger / tests / analysis / View on Github external
async def del_folder(bucket, keys):
    loop = asyncio.get_event_loop()
    client = aioboto3.client("s3", loop=loop)
    await asyncio.gather(*[client.delete_object(Bucket=bucket, Key=key) for key in keys])
    await client.close()
github terrycain / aioboto3 / tests / View on Github external
async def test_getting_client(event_loop):
    """Simple getting of client."""
    aioboto3.DEFAULT_SESSION = None

    async with aioboto3.client('ssm', loop=event_loop, region_name='eu-central-1') as client:
        assert isinstance(client, AioBaseClient)
github alanjds / celery-serverless / celery_serverless / View on Github external
async def _func():
                async with aioboto3.client('lambda') as cli:
                    res = await cli.invoke(**invoke_options)
                return res
            future = run_aio_on_thread(_func())
github snowflakedb / SnowAlert / src / connectors / View on Github external
async def aio_sts_assume_role(src_role_arn, dest_role_arn, dest_external_id=None):
    session_name = ''.join(random.choice('0123456789ABCDEF') for i in range(16))
    async with aioboto3.client('sts') as sts:
        src_role = await sts.assume_role(
            RoleArn=src_role_arn, RoleSessionName=session_name
        async with aioboto3.Session(
        ).client('sts') as sts_client:
            sts_role = await (
                if dest_external_id
                else sts_client.assume_role(
github terrycain / aioboto3 / aioboto3 / s3 / View on Github external
async def setup(self):
        self._kms_client = aioboto3.client('kms', **self._kms_client_args)
github terrycain / aioboto3 / aioboto3 / s3 / View on Github external
async def setup(self):
        if sys.version_info < (3, 7):
            self._loop = asyncio.get_event_loop()
            self._loop = asyncio.get_running_loop()

        self._s3_client = aioboto3.client('s3', **self._s3_client_args)
        await self._crypto_context.setup()