This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // <auto-generated/> | |
| global using global::Microsoft.AspNetCore.Builder; | |
| global using global::Microsoft.AspNetCore.Hosting; | |
| global using global::Microsoft.AspNetCore.Http; | |
| global using global::Microsoft.AspNetCore.Routing; | |
| global using global::Microsoft.Extensions.Configuration; | |
| global using global::Microsoft.Extensions.DependencyInjection; | |
| global using global::Microsoft.Extensions.Hosting; | |
| global using global::Microsoft.Extensions.Logging; | |
| global using global::System; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM mcr.microsoft.com/dotnet/sdk:6.0 AS sdk | |
| WORKDIR /app | |
| COPY ./ ./ | |
| RUN dotnet publish -c Release -o out | |
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 | |
| WORKDIR /app | |
| COPY --from=sdk /app/out . | |
| ENTRYPOINT ["dotnet", "MinimalApi.dll"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WebApplicationBuilder builder = WebApplication.CreateBuilder(args); | |
| WebApplication app = builder.Build(); | |
| app.MapGet("/greeting", () => "aws w/ .NET"); | |
| app.Run("http://*:80"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Project Sdk="Microsoft.NET.Sdk.Web"> | |
| <PropertyGroup> | |
| <TargetFramework>net6.0</TargetFramework> | |
| <ImplicitUsings>enable</ImplicitUsings> | |
| </PropertyGroup> | |
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Amazon.Lambda.CloudWatchEvents.ScheduledEvents; | |
| using Amazon.Lambda.Core; | |
| namespace simplelambda{ | |
| public class Handler | |
| { | |
| [LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] | |
| public void Handle(ScheduledEvent cloudWatchEvent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace SQSProducer | |
| { | |
| class Program | |
| { | |
| static async Task Main(string[] args) | |
| { | |
| var message = "New Message for " + DateTime.Now.ToString(); | |
| SQSMessageProducer sQSMessageProducer = new SQSMessageProducer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task Send(String message) | |
| { | |
| string accessKey = "<AWS ACCESS KEY>"; | |
| string secret = "<AWS ACCESS KEY>"; | |
| string queueUrl = "<AWS ACCESS KEY>"; | |
| string awsregion = "<AWS ACCESS KEY>"; | |
| BasicAWSCredentials creds = new BasicAWSCredentials(accessKey, secret); | |
| RegionEndpoint region = RegionEndpoint.GetBySystemName(awsregion); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace SQSProducer | |
| { | |
| public class SQSMessageProducer{ | |
| public SQSMessageProducer() | |
| { | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace KafkaProducer | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var kafkaMessageProducer = new KafkaMessageProducer(); | |
| kafkaMessageProducer.Produce(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _producer = new ProducerBuilder<String, String>(config).Build(); | |
| _producer.Produce(_topic, new Message<string, string> { Key = Guid.NewGuid().ToString(), Value = "New Message: " + DateTime.Now.ToString() }, deliveryReportHandler); | |
| _producer.Flush(TimeSpan.FromSeconds(_flushTime)); |
NewerOlder