Skip to content

feat(codebuild): Lambda compute for codebuild projects#27934

Merged
mergify[bot] merged 29 commits intoaws:mainfrom
sakurai-ryo:add-lambda-compute-suport
Dec 23, 2023
Merged

feat(codebuild): Lambda compute for codebuild projects#27934
mergify[bot] merged 29 commits intoaws:mainfrom
sakurai-ryo:add-lambda-compute-suport

Conversation

@sakurai-ryo
Copy link
Copy Markdown
Contributor

@sakurai-ryo sakurai-ryo commented Nov 10, 2023

CodeBuild has added support for Lambda compute.
CloudFormation can be deployed as follows.

Resources:
  CodeBuildProject:
    Type: AWS::CodeBuild::Project
    Properties:
      Artifacts:
        Type: NO_ARTIFACTS
      ServiceRole: !GetAtt CodeBuildRole.Arn
      Source:
        # 
      Environment:
        Type: LINUX_LAMBDA_CONTAINER
        ComputeType: BUILD_LAMBDA_1GB
        Image: aws/codebuild/amazonlinux-x86_64-lambda-standard:go1.21
  CodeBuildRole:
    Type: AWS::IAM::Role
    Properties:
        # 

https://aws.amazon.com/about-aws/whats-new/2023/11/aws-codebuild-lambda-compute

This PR implements Lambda ComputeType by adding Classes (LinuxArmLambdaBuildImage, LinuxLambdaBuildImage) that extend the IBuildImage interface.

Supported Docker Images and ComputeTypes are listed below.
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types

Also, Lambda compute has some limitations and I have added validation for them.
https://docs.aws.amazon.com/codebuild/latest/userguide/lambda.html#lambda.limitations

closes #28418


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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-codebuild: CodeBuild lambda images/compute types missing from CDK

4 participants