Exemplo n.º 1
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            _s3Client = new AmazonS3Client();

            // read configuration settings
            _bucketName = config.ReadS3BucketName("MyBucket");
        }
Exemplo n.º 2
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            Client = new AmazonPinpointClient();

            // TODO: s3 bucket for storage
            PinpointBucket = config.ReadS3BucketName("PinpointBucket");
        }
Exemplo n.º 3
0
 //--- Methods ---
 public override async Task InitializeAsync(LambdaConfig config)
 {
     _transcribe       = new AmazonTranscribeServiceClient();
     _outputBucketName = config.ReadS3BucketName("ExtractedTextBucket");
     _notifyQueueUrl   = config.ReadSqsQueueUrl("ProgressQueue");
     _sqsClient        = new AmazonSQSClient();
 }
Exemplo n.º 4
0
 //--- Methods ---
 public override Task InitializeAsync(LambdaConfig config)
 {
     Polly  = new AmazonPollyClient();
     S3     = new AmazonS3Client();
     Bucket = config.ReadS3BucketName("ArticlesBucket");
     return(Task.CompletedTask);
 }
Exemplo n.º 5
0
 //--- Methods ---
 public override async Task InitializeAsync(LambdaConfig config)
 {
     _manifestBucket   = config.ReadS3BucketName("ManifestBucket");
     _s3Client         = new AmazonS3Client();
     _unzipLogic       = new UnzipLogic(Logger, _manifestBucket, _s3Client);
     _writeJsonLogic   = new WriteJsonLogic(Logger, _s3Client, LambdaSerializer);
     _emptyBucketLogic = new EmptyBucketLogic(Logger, _s3Client);
 }
Exemplo n.º 6
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            // read configuration
            _bucketName = config.ReadS3BucketName("BucketArn");

            // initialize clients
            _s3Client = new AmazonS3Client();
        }
Exemplo n.º 7
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            // read function settings
            _destinationBucketName = config.ReadS3BucketName("DestinationBucket");

            // initialize clients
            _converter = new CloudFormationSpecificationConverter(HttpClient);
            _s3Client  = new AmazonS3Client();
        }
Exemplo n.º 8
0
 //--- Methods ---
 public override Task InitializeAsync(LambdaConfig config)
 {
     Polly             = new AmazonPollyClient();
     S3                = new AmazonS3Client();
     SnsClient         = new AmazonSimpleNotificationServiceClient();
     Bucket            = config.ReadS3BucketName("ArticlesBucket");
     NotificationTopic = config.ReadText("ArticleAudioDone");
     return(Task.CompletedTask);
 }
Exemplo n.º 9
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            _s3Client = new AmazonS3Client();

            // show contents of /opt folder; the 'ffmpeg' file must have execution permissions to be invocable
            LogInfo(Exec("/bin/bash", "-c \"ls -al /opt\"").Output);

            // read configuration parameters
            _destinationBucketName = config.ReadS3BucketName("AnimatedGifBucket");
        }
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            // read configuration
            _bucketName             = config.ReadS3BucketName("BucketArn");
            _contentCreatedTopicArn = config.ReadText("ContentCreatedTopicArn");
            _contentUpdatedTopicArn = config.ReadText("ContentUpdatedTopicArn");
            _contentDeletedTopicArn = config.ReadText("ContentDeletedTopicArn");

            // initialize clients
            _s3Client  = new AmazonS3Client();
            _snsClient = new AmazonSimpleNotificationServiceClient();
        }
Exemplo n.º 11
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            _s3Client = new AmazonS3Client();
            _destinationBucketName = config.ReadS3BucketName("ExtractedAudioBucket");
            _table = new IndexingStatusTable(
                config.ReadDynamoDBTableName("IndexingStatusTable"),
                new AmazonDynamoDBClient()
                );

            // show contents of /opt folder; the 'ffmpeg' file must have execution permissions to be invocable
            LogInfo(Exec("/bin/bash", "-c \"ls -al /opt\"").Output);
        }
Exemplo n.º 12
0
 //--- Methods ---
 public override Task InitializeAsync(LambdaConfig config)
 {
     // NOTE: All the logic of the lambda function can be found in this `Logic` class.
     _logic = new Logic(new AmazonPollyClient(),
                        new AmazonS3Client(),
                        new AmazonSimpleNotificationServiceClient(),
                        new AmazonTranslateClient(),
                        this,
                        config.ReadS3BucketName("ArticlesBucket"),
                        config.ReadText("ArticlesTopic"),
                        _httpClient);
     return(Task.CompletedTask);
 }
Exemplo n.º 13
0
        //--- Methods ---
        public override async Task InitializeAsync(LambdaConfig config)
        {
            // read function settings
            _destinationBucketName = config.ReadS3BucketName("DestinationBucket");

            // initialize clients
            _converter = new IamPermissionsConverter(
                HttpClient,
                logInfo: message => LogInfo(message),
                logWarn: message => LogWarn(message),
                logError: (exception, message) => LogError(exception, message)
                );
            _s3Client = new AmazonS3Client();
        }
Exemplo n.º 14
0
 //--- Methods ---
 public override async Task InitializeAsync(LambdaConfig config)
 {
     _bucketName = config.ReadS3BucketName("BestAppBucket");
     _s3Client   = new AmazonS3Client();
 }