You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature request contains a breaking change to the aws-s3objectlambda module. However, since this module is still in alpha, I think we can discuss breaking changes as well!
Currently, however, AccessPoint construct cannot specify multiple transactionsformation configurations.
Only one Lambda function can be specified in AccessPointProps, and the constructor of the AccessPoint class is hardcoded with an array.
(This implementation is natural because multiple S3 APIs were not supported at the time this L2 Construct was created. #15833)
Therefore, I would like to change the AccessPointProps interface to allow multiple transactionsConfigurations to be set.
This change would cause a breaking change because it would change a required property (e.g. AccessPointProps.handler).
Use Case
The ability to specify multiple transactionsConfigurations in an AccessPoint construct allows users more flexibility in object transformation.
This can be configured in Cloudformation as follows.
Remove the AccessPointProps.handler property and accept an array of TransformationConfiguration.
export interface AccessPointProps {
// ....
- readonly handler: lambda.IFunction;+ /**+ * The configurations for the S3 Object Lambda Access Point transformation.+ */+ readonly transformationConfigurations: TransformationConfiguration[];
}
+export interface TransformationConfiguration {+ /**+ * Whether the Lambda function can process `HeadObject-PartNumber` requests.+ *+ * @default - [S3ObjectLambdaAction.GET_OBJECT]+ */+ readonly actions?: S3ObjectLambdaAction[];+ /**+ * The Lambda function used to transform objects.+ */+ readonly handler: lambda.IFunction;+ /**+ * Additional JSON that provides supplemental data passed to the+ * Lambda function on every request.+ *+ * @default - No data.+ */+ readonly payload?: { [key: string]: any };+}+ /**+ * The actions for the Object Lambda Access Point configuration.+ */+ export enum S3ObjectLambdaAction {+ /**+ * Action to invoke a Lambda function for the GetObject operation+ */+ GET_OBJECT = 'GetObject',+ /**+ * Action to invoke a Lambda function for the HeadObject operation+ */+ HEAD_OBJECT = 'HeadObject',+ /**+ * Action to invoke a Lambda function for the ListObject operation+ */+ LIST_OBJECT = 'ListObject',+ /**+ * Action to invoke a Lambda function for the ListObjectV2 operation+ */+ LIST_OBJECT_V2 = 'ListObjectV2',+ }
Other Information
No response
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
CDK version used
v2.110.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered:
Describe the feature
This feature request contains a breaking change to the
aws-s3objectlambda
module.However, since this module is still in alpha, I think we can discuss breaking changes as well!
CloudFormation allows us to specify multiple
transactionConfigurations
, each of which can specify a different Lambda or target S3 APIs.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-objectlambdaconfiguration.html
Currently, however,
AccessPoint
construct cannot specify multiple transactionsformation configurations.Only one Lambda function can be specified in
AccessPointProps
, and the constructor of theAccessPoint
class is hardcoded with an array.aws-cdk/packages/@aws-cdk/aws-s3objectlambda-alpha/lib/access-point.ts
Line 48 in c66e197
aws-cdk/packages/@aws-cdk/aws-s3objectlambda-alpha/lib/access-point.ts
Line 231 in c66e197
(This implementation is natural because multiple S3 APIs were not supported at the time this L2 Construct was created. #15833)
Therefore, I would like to change the
AccessPointProps
interface to allow multiple transactionsConfigurations to be set.This change would cause a breaking change because it would change a required property (e.g.
AccessPointProps.handler
).Use Case
The ability to specify multiple transactionsConfigurations in an
AccessPoint
construct allows users more flexibility in object transformation.This can be configured in Cloudformation as follows.
From the user's point of view, it would be nice to be able to use
AccessPoint
constructs in this wayinstead of the current way of using them in this way.
Proposed Solution
Remove the
AccessPointProps.handler
property and accept an array ofTransformationConfiguration
.Other Information
No response
Acknowledgements
CDK version used
v2.110.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: