This cdk IaC library helps you to deploy AWS cloud infrastructure to allow embedded Linux builds for your project.
API documentation generated by npm run doc
In order to use this library, you must set up the CDK, including installing the CDK tool and bootstrapping the account you wish to deploy to. Additionally, you must have Node installed.
This library is tested against Node Versions 22. If these version is not available for your system, we recommend using NVM to install a compatible version
Use the examples in our examples repo.
mkdir my-project
cd my-project
cdk init app --language typescript
npm install aws4embeddedlinux/aws4embeddedlinux-ci
.cdk deploy
.The cdk diff
command can be used to preview changes before deployment. This will allow the user to review what is being created.
You can use npm link
to develop with a local copy of this repo.
npm install
npm install
npm link ../aws4embeddedlinux-ci
This will link through the system node_modules
install. When using a system node install on Linux, this can require sudo access. To avoid this, use
a node version manager
or set a node prefix.
See SECURITY for more information about reporting issues with this project.
AWS Secrets Manager is the preferred method of adding secrets to your pipeline. This service provides a structured means of access and avoids the pitfalls of putting secrets in environment variables, source repos, etc.
secretsmanager:GetSecretValue
for your secret.buildPolicyAdditions
props for the EmbeddedLinuxPipelineStack
. e.g.import * as iam from "aws-cdk-lib/aws-iam";
const pipeline = new EmbeddedLinuxPipelineStack(app, "MyPokyPipeline", {
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
vpc: vpc.vpc,
buildPolicyAdditions: [
iam.PolicyStatement.fromJson({
Effect: "Allow",
Action: "secretsmanager:GetSecretValue",
Resource:
"arn:aws:secretsmanager:us-west-2:123456789012:secret:my-secret-??????",
}),
],
});
The secret can then be used in the CodeBuild Project by adding it to the BuildSpec. See the CodeBuild Documentation for more details.
env:
secrets-manager:
SECRET_VALUE: "<Secret ARN>"
CVE checking is enabled in the reference implementations. Details on this can be found in the yocto documentation.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.