in infrastructure/emr_launch/cluster_definition.py [0:0]
def authorize_buckets(self, input_data_bucket_arns, output_data_bucket_arns):
input_data_buckets = {
b_name: s3.Bucket.from_bucket_arn(self, f"In-bucket{i}", bucket_arn=b_name)
for i, b_name in enumerate(input_data_bucket_arns)
}
output_data_buckets = {
b_name: s3.Bucket.from_bucket_arn(self, f"Out-bucket{i}", bucket_arn=b_name)
for i, b_name in enumerate(output_data_bucket_arns)
}
for b_name, bucket in input_data_buckets.items():
self._emr_profile.authorize_input_bucket(bucket)
for b_name, bucket in output_data_buckets.items():
self._emr_profile.authorize_output_bucket(bucket)