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(s3-deployment): enable efs support for handling large files in lambda #15220

Merged
merged 21 commits into from
Sep 15, 2021

Conversation

keshav0891
Copy link
Contributor

feat(s3-deployment): enable efs support for handling large files in lambda

It allows to attach EFS storage in worker lambda to handle large files upload;
Refactored unused imports

Verified that changes work by uploading large file (~350MB) using EFS support


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…ambda

It allows to attach EFS storage in worker lambda to handle large files upload;
Refactored unused imports

Verified that changes work by uploading large file (~350MB) using EFS support
@gitpod-io
Copy link

gitpod-io bot commented Jun 21, 2021

Keshav Sharma and others added 2 commits June 21, 2021 15:12
…ambda

Fix build failure in ECS tests

Verified that changes work by uploading large file (~350MB) using EFS support
@mergify mergify bot dismissed iliapolo’s stale review June 22, 2021 12:46

Pull request has been modified.

@iliapolo iliapolo self-assigned this Jun 27, 2021
@gMatas
Copy link

gMatas commented Jul 19, 2021

Hi there, just wanted to ask if there is any progress on this PR and its feature as I've been watching it for a while and noticed it has gone a bit stale.

@keshav0891
Copy link
Contributor Author

Hi there, just wanted to ask if there is any progress on this PR and its feature as I've been watching it for a while and noticed it has gone a bit stale.

I am awaiting on reviewer to have bandwidth for review.

@iliapolo iliapolo added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 2, 2021
@mergify mergify bot dismissed iliapolo’s stale review August 26, 2021 15:21

Pull request has been modified.

@iliapolo
Copy link
Contributor

@keshav0891 Responded to your questions. Sorry the long delay.

Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some fairly minor notes left, but this is starting to look really good now!

RomainMuller
RomainMuller previously approved these changes Sep 13, 2021
@mergify mergify bot dismissed RomainMuller’s stale review September 13, 2021 12:15

Pull request has been modified.

RomainMuller
RomainMuller previously approved these changes Sep 13, 2021
@gMatas
Copy link

gMatas commented Sep 14, 2021

I've tried to make custom resource handler function dependent on the provided VPC, as suggested previously. This way InternetGateway and other VPC related resources were not destroyed before custom resource and its handler function do their magic.

function = S3LargeDeploymentFunction(
    scope,
    name=f'{name}Function',
    destination_bucket=destination_bucket,
    deployment_props=props,
    mount_path=mount_path,
    access_point=access_point
)

if props.vpc:
    function.node.add_dependency(props.vpc)

I've also added the line suggested by @RomainMuller:

if props.use_efs and props.vpc:
    file_system = self.__get_efs_filesystem(scope, props.vpc, props.efs_props or EfsProps())
    access_point = file_system.add_access_point(
        f'{name}FunctionAccessPoint',
        path=access_point_path,
        create_acl=Acl(
            owner_gid='1001',
            owner_uid='1001',
            permissions='0777'
        ),
        posix_user=PosixUser(
            gid='1001',
            uid='1001'
        )
    )

    access_point.node.add_dependency(file_system.mount_targets_available)

@keshav0891
Copy link
Contributor Author

keshav0891 commented Sep 15, 2021

@gMatas
Thanks Mathew for the suggestion. I was able to resolve this too and the trick was to make VPC dependent on BucketDeployment instead of Lambda handler or EFS file system only.

if (props.vpc) {
  this.node.addDependency(props.vpc);
}

Will merge my changes for review soon.

@mergify mergify bot dismissed stale reviews from iliapolo and RomainMuller September 15, 2021 05:56

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 1700908
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 2737119 into aws:master Sep 15, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 15, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants