예제 #1
0
        public void SendEmail()
        {
            var service = new SesService(new S3Service(new AwsCredentials
            {
                RegionEndpoint = RegionEndpoint.USEast1
            }, "bucketname"), new AwsCredentials
            {
                RegionEndpoint = RegionEndpoint.USWest2
            });

            service.Send(new HelloEmail());
        }
예제 #2
0
        /// <summary>
        /// This method is called for every Lambda invocation. This method takes in an SNS event object and can be used
        /// to respond to SNS messages.
        /// </summary>
        /// <param name="evnt"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        public async Task FunctionHandler(SNSEvent evnt, ILambdaContext context)
        {
            ISesEvent evento = JsonSerializer.Deserialize <SesEvent>(evnt.Records[0].Sns.Message);

            await SesService.SendMessage(evento);
        }