Ejemplo n.º 1
0
        /// <summary>
        /// Default constructor. This constructor is used by Lambda to construct the instance. When invoked in a Lambda environment
        /// the AWS credentials will come from the IAM role associated with the function and the AWS region will be set to the
        /// region the Lambda function is executed in.
        /// </summary>
        public Function()
        {
            DependencyResolver resolver = new DependencyResolver(ConfigureServices);

            _loggingService = resolver.ServiceProvider.GetRequiredService <ILogService>();
            _standardQueue  = resolver.ServiceProvider.GetRequiredService <IStandardQueueService>();
            _amazonSES      = resolver.ServiceProvider.GetRequiredService <IAmazonSES>();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Default constructor. This constructor is used by Lambda to construct the instance. When invoked in a Lambda environment
        /// the AWS credentials will come from the IAM role associated with the function and the AWS region will be set to the
        /// region the Lambda function is executed in.
        /// </summary>
        public Function()
        {
            S3Client = new AmazonS3Client();

            AmazonSQSConfig sqsConfig = new AmazonSQSConfig();

            sqsClient = new AmazonSQSClient();
            DependencyResolver resolver = new DependencyResolver(ConfigureServices);

            _loggingService = resolver.ServiceProvider.GetRequiredService <ILogService>();
            _standardQueue  = resolver.ServiceProvider.GetRequiredService <IStandardQueueService>();
        }