(self)
Ensures that the AWS services, resources, and policies are set
        up so that they can all talk to one another and so that we
        can transcode media files.
Ensures that the AWS services, resources, and policies are set
        up so that they can all talk to one another and so that we
        can transcode media files.
Ensures that the AWS services resources and policies are set up so that they can all talk to one another and so that we can transcode media files .
def ensure_aws_setup(self):
        """
        Ensures that the AWS services, resources, and policies are set
        up so that they can all talk to one another and so that we
        can transcode media files.
        """
        if self.bucket_exists(self.in_bucket_name):
            self.in_bucket = self.s3.Bucket(self.in_bucket_name)
        else:
            self.in_bucket = self.s3.create_bucket(
                Bucket=self.in_bucket_name)

        if self.bucket_exists(self.out_bucket_name):
            self.out_bucket = self.s3.Bucket(self.out_bucket_name)
        else:
            self.out_bucket = self.s3.create_bucket(
                Bucket=self.out_bucket_name)

        if self.iam_role_exists():
            self.role = self.iam.Role(self.role_name)
        else:
            self.role = self.setup_iam_role()

        self.topic_arn = self.get_sns_topic()
        self.queue = self.get_sqs_queue()

        self.pipeline_id = self.get_pipeline()
def ensure_aws_setup ( self ) : if self . bucket_exists ( self . in_bucket_name ) : self . in_bucket = self . s3 . Bucket ( self . in_bucket_name ) else : self . in_bucket = self . s3 . create_bucket ( Bucket = self . in_bucket_name ) if self . bucket_exists ( self . out_bucket_name ) : self . out_bucket = self . s3 . Bucket ( self . out_bucket_name ) else : self . out_bucket = self . s3 . create_bucket ( Bucket = self . out_bucket_name ) if self . iam_role_exists ( ) : self . role = self . iam . Role ( self . role_name ) else : self . role = self . setup_iam_role ( ) self . topic_arn = self . get_sns_topic ( ) self . queue = self . get_sqs_queue ( ) self . pipeline_id = self . get_pipeline ( )