Description
Use case
I'm working on a project that integrates AWS Transfer Family with Custom Identity Providers like: Auth0, Okta and others. To make this possible, you should have a Lambda in the middle that will receive the event from Transfer Family and then you do whatever logic you need to authenticate or not the client.
Payload
The payload looks like this, the only thing special about this payload is because the password cannot be sent if the user is authenticating using public keys, so, must make it optional.
{
"username": "value",
"password": "value",
"protocol": "SFTP",
"serverId": "s-abcd123456",
"sourceIp": "192.168.0.100"
}
Solution/User Experience
The experience should be something like this:
from aws_lambda_powertools.utilities.parser import parse
from aws_lambda_powertools.utilities.parser.models import AWSTransferFamily
from aws_lambda_powertools.utilities.typing import LambdaContext
def lambda_handler(event: AWSTransferFamily, context: LambdaContext) -> list:
parsed_event = parse(model=TransferFamily, event=event)
...
Alternative solutions
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Type
Projects
Status
Shipped