Skip to content
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

feat(s3objectlambda): open s3 access point arn #32661

Merged
merged 8 commits into from
Jan 6, 2025
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ export class AccessPoint extends AccessPointBase {
*/
public readonly accessPointCreationDate: string;

/**
* The ARN of the S3 access point.
* @attribute
*/
public readonly s3AccessPointArn: string;

constructor(scope: Construct, id: string, props: AccessPointProps) {
super(scope, id, {
physicalName: props.accessPointName,
Expand Down Expand Up @@ -241,6 +247,7 @@ export class AccessPoint extends AccessPointBase {
],
},
});
this.s3AccessPointArn = supporting.attrArn;
this.accessPointName = accessPoint.ref;
this.accessPointArn = accessPoint.attrArn;
this.accessPointCreationDate = accessPoint.attrCreationDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ test('Can create a valid access point', () => {
regional: false,
}),
});
new cdk.CfnOutput(stack, 'S3AccessPointArn', {
value: accessPoint.s3AccessPointArn,
});

expect(Template.fromStack(stack).findOutputs('*')).toEqual(
{
Expand Down Expand Up @@ -98,6 +101,14 @@ test('Can create a valid access point', () => {
],
},
},
S3AccessPointArn: {
Value: {
'Fn::GetAtt': [
'MyObjectLambdaSupportingAccessPointA2D2026E',
'Arn',
],
},
},
VirtualHostedRegionalUrl: {
Value: {
'Fn::Join': [
Expand Down
Loading