Skip to content

Commit

Permalink
docs(lambda): Use bundlingImage rather than bundlingDockerImage (aws#…
Browse files Browse the repository at this point in the history
…13945)

Resolves aws#13944
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
michaelbrewer authored and hollanddd committed Aug 26, 2021
1 parent c5333dd commit 2ff519a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,19 +451,19 @@ Example with Python:
new lambda.Function(this, 'Function', {
code: lambda.Code.fromAsset(path.join(__dirname, 'my-python-handler'), {
bundling: {
image: lambda.Runtime.PYTHON_3_6.bundlingDockerImage,
image: lambda.Runtime.PYTHON_3_8.bundlingImage,
command: [
'bash', '-c',
'pip install -r requirements.txt -t /asset-output && cp -au . /asset-output'
],
},
}),
runtime: lambda.Runtime.PYTHON_3_6,
runtime: lambda.Runtime.PYTHON_3_8,
handler: 'index.handler',
});
```

Runtimes expose a `bundlingDockerImage` property that points to the [AWS SAM](https://github.com/awslabs/aws-sam-cli) build image.
Runtimes expose a `bundlingImage` property that points to the [AWS SAM](https://github.com/awslabs/aws-sam-cli) build image.

Use `cdk.DockerImage.fromRegistry(image)` to use an existing image or
`cdk.DockerImage.fromBuild(path)` to build a specific image:
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/test/integ.bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TestStack extends Stack {
const fn = new lambda.Function(this, 'Function', {
code: lambda.Code.fromAsset(assetPath, {
bundling: {
image: lambda.Runtime.PYTHON_3_6.bundlingDockerImage,
image: lambda.Runtime.PYTHON_3_6.bundlingImage,
command: [
'bash', '-c', [
'cp -au . /asset-output',
Expand Down

0 comments on commit 2ff519a

Please sign in to comment.