aws / aws/aws-cdk

(@aws-cdk/aws-bedrock-agentcore-alpha): Add Support NodeJS support

Open
#37,772 2 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-bedrock-agentcore-alpha effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

AWS recently announced a direct code deployment for [Agentcore to support NodeJS](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy-node.html).

This would remove the friction of putting your Strands agents into a Docker container and thus into ECR (also saves costs).

### Use Case

When building (Strands) agents fully with the NodeJS ecosystem.

### Proposed Solution

It would be great if it could detect whether it is TypeScript or JavaScript out of the box and generate an esbuild script that transpiles it to JavaScript with Node v22 as the target.

```ts
const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromCodeAsset({
path: path.join(__dirname, 'path/to/agent/code'),
runtime: agentcore.AgentCoreRuntime.NODEJS_22,
entrypoint: ['my-function', 'main.ts'], // note that I use Typescript here but the esbuild should compile it to Node 22
});

const runtimeInstance = new agentcore.Runtime(this, "MyAgentRuntime", {
runtimeName: "myAgent",
agentRuntimeArtifact: agentRuntimeArtifact,
});
```

### Other Information

[Cloudformation is already supporting Node 22](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-bedrockagentcore-runtime-codeconfiguration.html)

[Here is AWS official docs](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy-node.html)

[Strands SDK with TypeScript](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy-node.html)

### Acknowledgements

- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS CDK Library version (aws-cdk-lib)

2.252.0

### AWS CDK CLI version

2.1120.0

### Environment details (OS name and version, etc.)

MacOS

Contributor guide

Open the contributing guide

Research direction

Start by reading the @aws-cdk/aws-bedrock-agentcore-alpha implementation around AgentRuntimeArtifact.fromCodeAsset and AgentCoreRuntime, then compare its supported runtimes with the AWS CloudFormation and AgentCore Node.js deployment documentation linked in the issue. Done means TypeScript and JavaScript assets are detected and an esbuild-based Node.js 22 deployment path is supported through the proposed entrypoint configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, typescript
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.