forked from cythral/lambdajection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHandler.cs
More file actions
27 lines (21 loc) · 719 Bytes
/
Handler.cs
File metadata and controls
27 lines (21 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Lambdajection.Attributes;
using Microsoft.Extensions.Options;
namespace Lambdajection.Examples.EncryptedOptions
{
[Lambda(typeof(Startup))]
public partial class Handler
{
private readonly Options options;
public Handler(IOptions<Options> options)
{
this.options = options.Value;
}
public Task<string> Handle(object request, CancellationToken cancellationToken = default)
{
return Task.FromResult(options.EncryptedValue); // despite the name, this value will have already been decrypted for you.
}
}
}