Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ assignees: ''

## Environment

* **Powertools version used**:
* **Powertools for AWS Lambda (Java) version used**:
* **Packaging format (Layers, Maven/Gradle)**:
* **AWS Lambda function runtime:**
* **Debugging logs**
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ body:
attributes:
label: Acknowledgment
options:
- label: This request meets [Lambda Powertools Tenets](https://awslabs.github.io/aws-lambda-powertools-java/#tenets)
- label: This request meets [Powertools for AWS Lambda (Java) Tenets](https://awslabs.github.io/aws-lambda-powertools-java/#tenets)
required: true
- label: Should this be considered in other Lambda Powertools languages? i.e. [Python](https://github.com/awslabs/aws-lambda-powertools-python/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/)
- label: Should this be considered in other Powertools for AWS Lambda (Java) languages? i.e. [Python](https://github.com/awslabs/aws-lambda-powertools-python/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/)
required: false
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ assignees: ''

> This is the bulk of the RFC.

> Explain the design in enough detail for somebody familiar with Powertools to understand it, and for somebody familiar with the implementation to implement it.
> Explain the design in enough detail for somebody familiar with Powertools for AWS Lambda (Java) to understand it, and for somebody familiar with the implementation to implement it.

> This should get into specifics and corner-cases, and include examples of how the feature is used. Any new terminology should be defined here.

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/share_your_work.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: I Made This (showcase your work)
description: Share what you did with Powertools 💞💞. Blog post, workshops, presentation, sample apps, etc.
description: Share what you did with Powertools for AWS Lambda (Java) 💞💞. Blog post, workshops, presentation, sample apps, etc.
title: "[I Made This]: <TITLE>"
labels: ["community-content"]
body:
Expand All @@ -13,7 +13,7 @@ body:
description: |
Please share the original link to your material.

*Note: Short links will be expanded when added to Powertools documentation*
*Note: Short links will be expanded when added to Powertools for AWS Lambda (Java) documentation*
validations:
required: true
- type: textarea
Expand Down Expand Up @@ -44,13 +44,13 @@ body:
description: |
Any notes you might want to share with us related to this material.

*Note: These notes are explicitly to Powertools maintainers. It will not be added to the community resources page.*
*Note: These notes are explicitly to Powertools for AWS Lambda (Java) maintainers. It will not be added to the community resources page.*
validations:
required: false
- type: checkboxes
id: acknowledgment
attributes:
label: Acknowledgment
options:
- label: I understand this content may be removed from Powertools documentation if it doesn't conform with the [Code of Conduct](https://aws.github.io/code-of-conduct)
- label: I understand this content may be removed from Powertools for AWS Lambda (Java) documentation if it doesn't conform with the [Code of Conduct](https://aws.github.io/code-of-conduct)
required: true
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/support_powertools.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Support Lambda Powertools (become a reference)
description: Add your organization's name or logo to the Lambda Powertools documentation
title: "[Support Lambda Powertools]: <your organization name>"
name: Support Powertools for AWS Lambda (Java) (become a reference)
description: Add your organization's name or logo to the Powertools for AWS Lambda (Java) documentation
title: "[Support Powertools for AWS Lambda (Java)]: <your organization name>"
labels: ["customer_reference"]
body:
- type: markdown
Expand Down Expand Up @@ -42,13 +42,13 @@ body:
id: use_case
attributes:
label: (Optional) Use case
description: How are you using Lambda Powertools today? *features, etc.*
description: How are you using Powertools for AWS Lambda (Java) today? *features, etc.*
validations:
required: false
- type: checkboxes
id: other_languages
attributes:
label: Also using other Lambda Powertools languages?
label: Also using other Powertools for AWS Lambda (Java) languages?
options:
- label: Python
required: false
Expand All @@ -59,6 +59,6 @@ body:
- type: markdown
attributes:
value: |
*By raising a Support Lambda Powertools issue, you are granting AWS permission to use your company's name (and/or logo) for the limited purpose described here. You are also confirming that you have authority to grant such permission.*
*By raising a Support Powertools for AWS Lambda (Java) issue, you are granting AWS permission to use your company's name (and/or logo) for the limited purpose described here. You are also confirming that you have authority to grant such permission.*

*You can opt-out at any time by commenting or reopening this issue.*
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo
### Documentation

* Improve `powertools-cloudformation` docs (#1090) by @mriccia
* Add link to Lambda powertools workshop (#1095) by @scottgerring
* Add link to Powertools for AWS Lambda (Java) workshop (#1095) by @scottgerring
* Fix mdocs and git revision plugin integration (#1066) by @machafer


Expand All @@ -42,7 +42,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo

### Documentation

* Docs: Update PowerTools definition by @heitorlessa
* Docs: Update Powertools for AWS Lambda (Java) definition by @heitorlessa
* Docs: Add information about other supported langauges to README and docs (#1033) by @kozub

## [1.13.0] - 2022-12-14
Expand Down Expand Up @@ -101,8 +101,8 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo
## [1.11.0] - 2022-02-16

### Added
* Powertools Idempotency module: New module to get your Lambda function [Idempotent](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/) (#717)
* Powertools Serialization module: New module to handle JSON (de)serialization (Jackson ObjectMapper, JMESPath functions)
* Powertools for AWS Lambda (Java) Idempotency module: New module to get your Lambda function [Idempotent](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/) (#717)
* Powertools for AWS Lambda (Java) Serialization module: New module to handle JSON (de)serialization (Jackson ObjectMapper, JMESPath functions)


## [1.10.3] - 2022-02-01
Expand Down Expand Up @@ -151,7 +151,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo

### Added

* **Powertools Cloudformation module (NEW)**: New module simplifying [AWS Lambda-backed custom resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html) written in Java. [#560](https://github.com/awslabs/aws-lambda-powertools-java/pull/560)
* **Powertools for AWS Lambda (Java) Cloudformation module (NEW)**: New module simplifying [AWS Lambda-backed custom resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html) written in Java. [#560](https://github.com/awslabs/aws-lambda-powertools-java/pull/560)
* **SQS Large message processing**: Ability to override the default `S3Client` use to fetch payload from S3. [#602](https://github.com/awslabs/aws-lambda-powertools-java/pull/602)

### Regression
Expand All @@ -168,14 +168,14 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo

## [1.7.2] - 2021-08-03

* **Powertools All Modules**: Upgrade to the latest(1.14.0) aspectj-maven-plugin which also supports Java 9 and newer versions.
* **Powertools for AWS Lambda (Java) All Modules**: Upgrade to the latest(1.14.0) aspectj-maven-plugin which also supports Java 9 and newer versions.
Users no longer need to depend on [com.nickwongdev](https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6) as a workaround. [#489](https://github.com/awslabs/aws-lambda-powertools-java/pull/489)
* **Logging**: Performance optimisation to improve cold start. [#484](https://github.com/awslabs/aws-lambda-powertools-java/pull/484)
* **SQS Batch processing/Large message**: Module now lazy loads default SQS client. [#484](https://github.com/awslabs/aws-lambda-powertools-java/pull/484)

## [1.7.1] - 2021-07-06

* **Powertools All Modules**: Fix static code analysis violations done via [spotbugs](https://github.com/spotbugs/spotbugs) ([#458](https://github.com/awslabs/aws-lambda-powertools-java/pull/458)).
* **Powertools for AWS Lambda (Java) All Modules**: Fix static code analysis violations done via [spotbugs](https://github.com/spotbugs/spotbugs) ([#458](https://github.com/awslabs/aws-lambda-powertools-java/pull/458)).

## [1.7.0] - 2021-07-05

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# AWS Lambda Powertools for Java
# Powertools for AWS Lambda (Java)

![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900) ![Build status](https://github.com/awslabs/aws-lambda-powertools-java/actions/workflows/build.yml/badge.svg) ![Maven Central](https://img.shields.io/maven-central/v/software.amazon.lambda/powertools-parent) [![codecov.io](https://codecov.io/github/awslabs/aws-lambda-powertools-java/branch/master/graphs/badge.svg)](https://app.codecov.io/gh/awslabs/aws-lambda-powertools-java)


Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
Powertools for AWS Lambda (Java) is a developer toolkit to implement Serverless best practices and increase developer velocity.

> Also available in [Python](https://github.com/awslabs/aws-lambda-powertools-python), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript), and [.NET](https://github.com/awslabs/aws-lambda-powertools-dotnet).

**[📜Documentation](https://awslabs.github.io/aws-lambda-powertools-java/)** | **[Feature request](https://github.com/awslabs/aws-lambda-powertools-java/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=)** | **[🐛Bug Report](https://github.com/awslabs/aws-lambda-powertools-java/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)** | **[Detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-aws-lambda-powertools-java/)**

### Installation

Powertools is available in Maven Central. You can use your favourite dependency management tool to install it
Powertools for AWS Lambda (Java) is available in Maven Central. You can use your favourite dependency management tool to install it

* [maven](https://maven.apache.org/):
```xml
Expand Down
4 changes: 2 additions & 2 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Frequently Asked Questions
---


## How can I use Powertools with Lombok?
## How can I use Powertools for AWS Lambda (Java) with Lombok?

Poweretools uses `aspectj-maven-plugin` to compile-time weave (CTW) aspects into the project. In case you want to use `Lombok` or other compile-time preprocessor for your project, it is required to change `aspectj-maven-plugin` configuration to enable in-place weaving feature. Otherwise the plugin will ignore changes introduced by `Lombok` and will use `.java` files as a source.

Expand All @@ -27,7 +27,7 @@ To enable in-place weaving feature you need to use following `aspectj-maven-plug
</configuration>
```

## How can I use Powertools with Kotlin projects?
## How can I use Powertools for AWS Lambda (Java) with Kotlin projects?

Poweretools uses `aspectj-maven-plugin` to compile-time weave (CTW) aspects into the project. When using it with Kotlin projects, it is required to `forceAjcCompile`.
No explicit configuration should be required for gradle projects.
Expand Down
2 changes: 1 addition & 1 deletion docs/core/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Logging provides an opinionated logger with output structured as JSON.

## Initialization

Powertools extends the functionality of Log4J. Below is an example `#!xml log4j2.xml` file, with the `JsonTemplateLayout` using `#!json LambdaJsonLayout.json` configured.
Powertools for AWS Lambda (Java) extends the functionality of Log4J. Below is an example `#!xml log4j2.xml` file, with the `JsonTemplateLayout` using `#!json LambdaJsonLayout.json` configured.

!!! info "LambdaJsonLayout is now deprecated"

Expand Down
4 changes: 2 additions & 2 deletions docs/core/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Before your use this utility, your AWS Lambda function [must have permissions](h
POWERTOOLS_SERVICE_NAME: example
```

The Powertools service name is used as the X-Ray namespace. This can be set using the environment variable
The Powertools for AWS Lambda (Java) service name is used as the X-Ray namespace. This can be set using the environment variable
`POWERTOOLS_SERVICE_NAME`

### Lambda handler

To enable Powertools tracing to your function add the `@Tracing` annotation to your `handleRequest` method or on
To enable Powertools for AWS Lambda (Java) tracing to your function add the `@Tracing` annotation to your `handleRequest` method or on
any method will capture the method as a separate subsegment automatically. You can optionally choose to customize
segment name that appears in traces.

Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Homepage
description: AWS Lambda Powertools for Java
description: Powertools for AWS Lambda (Java)
---

![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900) ![Build status](https://github.com/awslabs/aws-lambda-powertools-java/actions/workflows/build.yml/badge.svg) ![Maven Central](https://img.shields.io/maven-central/v/software.amazon.lambda/powertools-parent)

Powertools is a suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.
Powertools for AWS Lambda (Java) is a suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.

???+ tip
Powertools is also available for [Python](https://awslabs.github.io/aws-lambda-powertools-python/){target="_blank"}, [TypeScript](https://awslabs.github.io/aws-lambda-powertools-typescript/){target="_blank"}, and [.NET](https://awslabs.github.io/aws-lambda-powertools-dotnet/){target="_blank"}
Powertools for AWS Lambda is also available for [Python](https://awslabs.github.io/aws-lambda-powertools-python/){target="_blank"}, [TypeScript](https://awslabs.github.io/aws-lambda-powertools-typescript/){target="_blank"}, and [.NET](https://awslabs.github.io/aws-lambda-powertools-dotnet/){target="_blank"}


!!! tip "Looking for a quick run through of the core utilities?"
Check out [this detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-aws-lambda-powertools-java/) with a practical example. To dive deeper,
the [AWS Lambda Powertools for Java workshop](https://catalog.us-east-1.prod.workshops.aws/workshops/a7011c82-e4af-4a52-80fa-fcd61f1dacd9/en-US/introduction) is a great next step.
the [Powertools for AWS Lambda (Java) workshop](https://catalog.us-east-1.prod.workshops.aws/workshops/a7011c82-e4af-4a52-80fa-fcd61f1dacd9/en-US/introduction) is a great next step.

## Tenets

Expand All @@ -28,14 +28,14 @@ This project separates core utilities that will be available in other runtimes v

## Install

Powertools dependencies are available in Maven Central. You can use your favourite dependency management tool to install it
Powertools for AWS Lambda (Java) dependencies are available in Maven Central. You can use your favourite dependency management tool to install it

* [Maven](https://maven.apache.org/)
* [Gradle](https://gradle.org)

**Quick hello world examples using SAM CLI**

You can use [SAM](https://aws.amazon.com/serverless/sam/) to quickly setup a serverless project including AWS Lambda Powertools for Java.
You can use [SAM](https://aws.amazon.com/serverless/sam/) to quickly setup a serverless project including Powertools for AWS Lambda (Java).

```bash
sam init --location gh:aws-samples/cookiecutter-aws-sam-powertools-java
Expand Down
2 changes: 1 addition & 1 deletion docs/utilities/custom_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ In both of the scenarios, powertools-java will return the `physicalResourceId` t

#### Why do you need a physicalResourceId?

It is recommended that you always explicitly provide a `physicalResourceId` in your response rather than letting powertools generate if for you because `physicalResourceId` has a crucial role in the lifecycle of a CloudFormation custom resource.
It is recommended that you always explicitly provide a `physicalResourceId` in your response rather than letting Powertools for AWS Lambda (Java) generate if for you because `physicalResourceId` has a crucial role in the lifecycle of a CloudFormation custom resource.
If the `physicalResourceId` changes between calls from Cloudformation, for instance in response to an `Update` event, Cloudformation [treats the resource update as a replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html).

### Customising a response
Expand Down
6 changes: 3 additions & 3 deletions docs/utilities/idempotency.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ The client was successful in receiving the result after the retry. Since the Lam

This is automatically done when you annotate your Lambda handler with [@Idempotent annotation](#idempotent-annotation).

To prevent against extended failed retries when a [Lambda function times out](https://aws.amazon.com/premiumsupport/knowledge-center/lambda-verify-invocation-timeouts/), Powertools calculates and includes the remaining invocation available time as part of the idempotency record.
To prevent against extended failed retries when a [Lambda function times out](https://aws.amazon.com/premiumsupport/knowledge-center/lambda-verify-invocation-timeouts/), Powertools for AWS Lambda (Java) calculates and includes the remaining invocation available time as part of the idempotency record.

!!! example
If a second invocation happens **after** this timestamp, and the record is marked as `INPROGRESS`, we will execute the invocation again as if it was in the `EXPIRED` state.
Expand Down Expand Up @@ -846,8 +846,8 @@ public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent in
}
```

!!! tip "Tip: JMESPath Powertools functions are also available"
Built-in functions like `powertools_json`, `powertools_base64`, `powertools_base64_gzip` are also available to use in this utility. See [JMESPath Powertools functions](serialization.md)
!!! tip "Tip: JMESPath Powertools for AWS Lambda (Java) functions are also available"
Built-in functions like `powertools_json`, `powertools_base64`, `powertools_base64_gzip` are also available to use in this utility. See [JMESPath Powertools for AWS Lambda (Java) functions](serialization.md)


## Testing your code
Expand Down
Loading