Skip to content

Feature request: add TransferFamilySchema to Parser #3518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
dreamorosi opened this issue Jan 23, 2025 · 3 comments · Fixed by #3575
Closed
1 of 2 tasks

Feature request: add TransferFamilySchema to Parser #3518

dreamorosi opened this issue Jan 23, 2025 · 3 comments · Fixed by #3575
Assignees
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility good-first-issue Something that is suitable for those who want to start contributing parser This item relates to the Parser Utility

Comments

@dreamorosi
Copy link
Contributor

dreamorosi commented Jan 23, 2025

Use case

Powertools for AWS Lambda (Python) recently added a Parser built-in schema for customers who work with Transfer Family (aws-powertools/powertools-lambda-python#5903). We should do the same and add a schema to our version as well.

Note

If you're interested in picking this up please leave a comment to claim it. A maintainer will assign the issue to you and help you with reviewing your PR. Likewise, if you have any questions before starting, feel free to leave a comment below.

Solution/User Experience

Customers should be able to use the built-in schema the same way as they use all the other built-in ones. For example:

import { TransferFamilySchema } from '@aws-lambda-powertools/parser/schemas/transfer-family';
import type { TransferFamilyEvent } from '@aws-lambda-powertools/parser/types';

export const handler = middy(async (event: TransferFamilyEvent) => {
  // ... handle event
}).use(
  parser({ schema: TransferFamilySchema })
);

To work on the issue, we should:

  • Add the new schema under packages/parser/src/schemas/transfer-family.ts
  • Add the TransferFamilyEvent type in packagesparser/src/types/schema.ts & corresponding packagesparser/src/types/index (you can import the schema directly from the packages/parser/src/schemas/transfer-family.ts file rather than adding it to the barrel file - which we want to move away from)
  • Add the export to the packages/parser/package.json exports here and typesVersions here
  • Add the new built-in schema to the table within the docs here
  • Add the test event below at packages/parser/tests/events/transfer-family/base.json and write unit tests following the same style and conventions of the ones for other schemas, for example packages/parser/tests/unit/schema/alb.test.ts
{
    "username": "value",
    "password": "value",
    "protocol": "SFTP",
    "serverId": "s-abcd123456",
    "sourceIp": "192.168.0.100"
}

Alternative solutions

N/A

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@dreamorosi dreamorosi added confirmed The scope is clear, ready for implementation feature-request This item refers to a feature request for an existing or new utility good-first-issue Something that is suitable for those who want to start contributing help-wanted We would really appreciate some support from community for this one parser This item relates to the Parser Utility labels Jan 23, 2025
@dreamorosi dreamorosi moved this from Triage to Backlog in Powertools for AWS Lambda (TypeScript) Jan 23, 2025
@VatsalGoel3
Copy link
Contributor

Hi, I’d like to work on adding the Transfer Family built-in schema. Please assign this issue to me. Thanks!

@dreamorosi dreamorosi moved this from Backlog to Working on it in Powertools for AWS Lambda (TypeScript) Feb 9, 2025
@dreamorosi dreamorosi moved this from Working on it to Pending customer in Powertools for AWS Lambda (TypeScript) Feb 9, 2025
@dreamorosi dreamorosi removed the help-wanted We would really appreciate some support from community for this one label Feb 9, 2025
@github-project-automation github-project-automation bot moved this from Pending customer to Coming soon in Powertools for AWS Lambda (TypeScript) Feb 10, 2025
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Feb 10, 2025
Copy link
Contributor

This is now released under v2.14.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Feb 11, 2025
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility good-first-issue Something that is suitable for those who want to start contributing parser This item relates to the Parser Utility
Projects
2 participants