aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
4 lines (3 loc) • 678 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});const path=require("path"),iam=require("../../aws-iam"),core_1=require("../../core"),assets=require("../lib");class TestStack extends core_1.Stack{constructor(scope,id,props){super(scope,id,props);const asset=new assets.Asset(this,"BundledAsset",{path:path.join(__dirname,"markdown-asset"),bundling:{image:core_1.DockerImage.fromBuild(path.join(__dirname,"alpine-markdown")),command:["sh","-c",`
markdown index.md > /asset-output/index.html
`]}}),user=new iam.User(this,"MyUser");asset.grantRead(user)}}const app=new core_1.App;new TestStack(app,"cdk-integ-assets-bundling"),app.synth();