diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml index 01b6c16d..01f2d565 100644 --- a/.github/ISSUE_TEMPLATE/maintenance.yml +++ b/.github/ISSUE_TEMPLATE/maintenance.yml @@ -31,20 +31,12 @@ body: options: - Automation - Governance - - .NET sdk + - .NET SDK - Tests - - Tracer - - Logger + - Tracing + - Logging - Metrics - - Event Handler - REST API - - Event Handler - GraphQL API - - Middleware factory - Parameters - - Batch processing - - Typing - - Validation - - Event Source Data Classes - - Parser - Idempotency - Feature flags - Other diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index a0fc1289..00000000 --- a/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners - -* @aws-powertools/powertools-lambda-dotnet diff --git a/README.md b/README.md index 7f013155..668e8e05 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,13 @@ Powertools for AWS Lambda (.NET) provides three core utilities: * **[Tracing](https://docs.powertools.aws.dev/lambda-dotnet/core/tracing/)** - provides a simple way to send traces from functions to AWS X-Ray to provide visibility into function calls, interactions with other AWS services, or external HTTP requests. Annotations can easily be added to traces to allow filtering traces based on key information. For example, when using Tracer, a ColdStart annotation is created for you so you can easily group and analyze traces where there was an initialization overhead. -* **[Parameters (developer preview)](https://docs.powertools.aws.dev/lambda-dotnet/core/parameters/)** - provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html){target="_blank"}, [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/){target="_blank"}, or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/){target="_blank"}. We also provide extensibility to bring your own providers. +* **[Parameters (developer preview)](https://docs.powertools.aws.dev/lambda-dotnet/utilities/parameters/)** - provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html), [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/), or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/). We also provide extensibility to bring your own providers. + +* **[Idempotency (developer preview)](https://docs.powertools.aws.dev/lambda-dotnet/utilities/idempotency/)** - The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry. ### Installation -The Powertools for AWS Lambda (.NET) utilities (.NET 6) are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available. +The Powertools for AWS Lambda (.NET) utilities (.NET 6) are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*) or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available. * [AWS.Lambda.Powertools.Logging](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Logging): @@ -40,7 +42,11 @@ The Powertools for AWS Lambda (.NET) utilities (.NET 6) are available as NuGet p * [AWS.Lambda.Powertools.Parameters](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Parameters): - `dotnet add package AWS.Lambda.Powertools.AWS.Lambda.Powertools.Parameters` + `dotnet add package AWS.Lambda.Powertools.Parameters` + +* [AWS.Lambda.Powertools.Idempotency](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Idempotency): + + `dotnet add package AWS.Lambda.Powertools.Idempotency` ## Examples @@ -49,6 +55,8 @@ We have provided examples focused specifically on each of the utilities. Each so * **[Logging example](examples/Logging/)** * **[Metrics example](examples/Metrics/)** * **[Tracing example](examples/Tracing/)** +* **[Parameters example](examples/Parameters/)** +* **[Idempotency example](examples/Idempotency)** ## Other members of the Powertools for AWS Lambda family diff --git a/docs/index.md b/docs/index.md index c2a1db66..9870eaf4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,6 +29,8 @@ Core utilities such as Tracing, Logging, and Metrics will be available across al [Tracing](./core/tracing.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions [Logger](./core/logging.md) | Structured logging made easier, and decorator to enrich structured logging with key Lambda context details [Metrics](./core/metrics.md) | Custom AWS metrics created asynchronously via CloudWatch Embedded Metric Format (EMF) +[Parameters (developer preview)](./utilities/parameters/) | provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html){target="_blank"}, [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/){target="_blank"}, or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/){target="_blank"}. We also provide extensibility to bring your own providers. +[Idempotency (developer preview)](./utilities/idempotency/) | The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry. ## Install @@ -36,23 +38,27 @@ Powertools for AWS Lambda (.NET) is available as NuGet packages. You can install * [AWS.Lambda.Powertools.Tracing](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Tracing): - `dotnet nuget add AWS.Lambda.Powertools.Tracing` + `dotnet add package AWS.Lambda.Powertools.Tracing` * [AWS.Lambda.Powertools.Logging](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Logging): - `dotnet nuget add AWS.Lambda.Powertools.Logging` + `dotnet add package AWS.Lambda.Powertools.Logging` * [AWS.Lambda.Powertools.Metrics](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Metrics): - `dotnet nuget add AWS.Lambda.Powertools.Metrics` + `dotnet add package AWS.Lambda.Powertools.Metrics` -### SAM CLI custom template +* [AWS.Lambda.Powertools.Parameters](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Parameters): -We have provided you with a custom template for the Serverless Application Model (AWS SAM) command-line interface (CLI). This generates a starter project that allows you to interactively choose the Powertools for AWS Lambda (.NET) features that enables you to include in your project. + `dotnet add package AWS.Lambda.Powertools.Parameters` + +* [AWS.Lambda.Powertools.Idempotency](https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Idempotency): + + `dotnet add package AWS.Lambda.Powertools.Idempotency` -```bash -sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-dotnet -``` +### Using SAM CLI template + +We have provided you with a custom template for the Serverless Application Model (AWS SAM) command-line interface (CLI). This generates a starter project that allows you to interactively choose the Powertools for AWS Lambda (.NET) features that enables you to include in your project. To use the SAM CLI, you need the following tools. @@ -60,13 +66,46 @@ To use the SAM CLI, you need the following tools. * .NET 6.0 (LTS) - [Install .NET 6.0](https://www.microsoft.com/net/download) * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) +Once you have SAM CLI installed, follow the these steps to initialize a .NET 6 project using Powertools for AWS (.NET) + +1. Run the following command in your command line + ```bash + sam init -r dotnet6 + ``` +2. Select option 1 as your template source + + ```bash + Which template source would you like to use? + 1 - AWS Quick Start Templates + 2 - Custom Template Location + ``` +3. Select the `Hello World Example with Powertools for AWS Lambda` template + + ``` + Choose an AWS Quick Start application template + 1 - Hello World Example + 2 - Data processing + 3 - Hello World Example with Powertools for AWS Lambda + 4 - Multi-step workflow + 5 - Scheduled task + 6 - Standalone function + 7 - Serverless API + Template: 3 + ``` + +4. Follow the rest of the prompts and give your project a name + +Viola! You now have a SAM application pre-configured with Powertools! + ## Examples We have provided a few examples that should you how to use the each of the core Powertools for AWS Lambda (.NET) features. -* [Tracing](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Tracing){target="_blank"} example -* [Logging](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Logging/){target="_blank"} example -* [Metrics](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Metrics/){target="_blank"} example +* [Tracing](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Tracing){target="_blank"} +* [Logging](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Logging/){target="_blank"} +* [Metrics](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Metrics/){target="_blank"} +* [Parameters](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Parameters/){target="_blank"} +* [Idempotency](https://github.com/aws-powertools/powertools-lambda-dotnet/tree/main/examples/Idempotency/){target="_blank"} ## Connect diff --git a/docs/core/idempotency.md b/docs/utilities/idempotency.md similarity index 97% rename from docs/core/idempotency.md rename to docs/utilities/idempotency.md index 4770ed1d..9fd11cd5 100644 --- a/docs/core/idempotency.md +++ b/docs/utilities/idempotency.md @@ -2,6 +2,10 @@ title: Idempotency description: Utility --- +???+ warning + **This utility is currently in developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**. The version and all future versions tagged with the `-preview` suffix should be treated as not stable. Until this utility is [General Availability](https://github.com/aws-powertools/powertools-lambda-dotnet/milestone/3) we may introduce significant breaking changes and improvements in response to customers feedback. + + The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry. @@ -23,15 +27,16 @@ The property of idempotency means that an operation does not cause additional si ## Getting started ### Installation + You should install with NuGet: -``` +```powershell Install-Package AWS.Lambda.Powertools.Idempotency ``` Or via the .NET Core command line interface: -``` +```bash dotnet add package AWS.Lambda.Powertools.Idempotency ``` diff --git a/docs/we_made_this.md b/docs/we_made_this.md index b879e3ad..40fc7078 100644 --- a/docs/we_made_this.md +++ b/docs/we_made_this.md @@ -7,7 +7,7 @@ description: Blog posts, tutorials, and videos about Powertools for AWS Lambda c This space is dedicated to highlight our awesome community content featuring Powertools for AWS Lambda (.NET) 🙏! -!!! info "[Get your content featured here](https://github.com/aws-powertools/powertools-lambda-python/issues/new?assignees=&labels=community-content&template=share_your_work.yml&title=%5BI+Made+This%5D%3A+%3CTITLE%3E){target="_blank"}!" +!!! info "[Get your content featured here](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/new?assignees=&labels=community-content&template=share_your_work.yml&title=%5BI+Made+This%5D%3A+%3CTITLE%3E){target="_blank"}!" ## Connect diff --git a/libraries/src/AWS.Lambda.Powertools.Common/AWS.Lambda.Powertools.Common.csproj b/libraries/src/AWS.Lambda.Powertools.Common/AWS.Lambda.Powertools.Common.csproj index b5f03c89..f62d3117 100644 --- a/libraries/src/AWS.Lambda.Powertools.Common/AWS.Lambda.Powertools.Common.csproj +++ b/libraries/src/AWS.Lambda.Powertools.Common/AWS.Lambda.Powertools.Common.csproj @@ -9,7 +9,7 @@ default Powertools for AWS Lambda (.NET) Powertools for AWS Lambda (.NET) - Core package. - Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. https://github.com/aws-powertools/powertools-lambda-dotnet Apache-2.0 AWS;Amazon;Lambda;Powertools diff --git a/libraries/src/AWS.Lambda.Powertools.Logging/AWS.Lambda.Powertools.Logging.csproj b/libraries/src/AWS.Lambda.Powertools.Logging/AWS.Lambda.Powertools.Logging.csproj index 6f11dfd0..dcb76378 100644 --- a/libraries/src/AWS.Lambda.Powertools.Logging/AWS.Lambda.Powertools.Logging.csproj +++ b/libraries/src/AWS.Lambda.Powertools.Logging/AWS.Lambda.Powertools.Logging.csproj @@ -9,7 +9,7 @@ Amazon.com, Inc Powertools for AWS Lambda (.NET) Powertools for AWS Lambda (.NET) - Logging package. - Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. https://github.com/aws-powertools/powertools-lambda-dotnet Apache-2.0 AWS;Amazon;Lambda;Powertools diff --git a/libraries/src/AWS.Lambda.Powertools.Metrics/AWS.Lambda.Powertools.Metrics.csproj b/libraries/src/AWS.Lambda.Powertools.Metrics/AWS.Lambda.Powertools.Metrics.csproj index f076625f..dbd62584 100644 --- a/libraries/src/AWS.Lambda.Powertools.Metrics/AWS.Lambda.Powertools.Metrics.csproj +++ b/libraries/src/AWS.Lambda.Powertools.Metrics/AWS.Lambda.Powertools.Metrics.csproj @@ -8,7 +8,7 @@ Amazon.com, Inc Powertools for AWS Lambda (.NET) Powertools for AWS Lambda (.NET) - Metrics package. - Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. https://github.com/aws-powertools/powertools-lambda-dotnet Apache-2.0 AWS;Amazon;Lambda;Powertools diff --git a/libraries/src/AWS.Lambda.Powertools.Tracing/AWS.Lambda.Powertools.Tracing.csproj b/libraries/src/AWS.Lambda.Powertools.Tracing/AWS.Lambda.Powertools.Tracing.csproj index 0c91e429..26579211 100644 --- a/libraries/src/AWS.Lambda.Powertools.Tracing/AWS.Lambda.Powertools.Tracing.csproj +++ b/libraries/src/AWS.Lambda.Powertools.Tracing/AWS.Lambda.Powertools.Tracing.csproj @@ -9,7 +9,7 @@ Amazon.com, Inc Powertools for AWS Lambda (.NET) Powertools for AWS Lambda (.NET) - Tracing package. - Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. https://github.com/aws-powertools/powertools-lambda-dotnet Apache-2.0 AWS;Amazon;Lambda;Powertools diff --git a/mkdocs.yml b/mkdocs.yml index a496ebee..3d8fd5b4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ nav: - core/tracing.md - Utilities: - utilities/parameters.md + - utilities/idempotency.md theme: name: material @@ -62,8 +63,7 @@ markdown_extensions: - pymdownx.details - pymdownx.snippets: base_path: "." - check_paths: true - restrict_base_path: false + check_paths: True - meta - toc: permalink: true