360 Secure SkillHub
360 安全技能中心

Aws S3

该 Skill 是一个预打包的 AWS S3 SDK npm 包,面向 OpenClaw 网关容器使用,已捆绑全部传递依赖,安装阶段无需联网。安装后 Agent 可在 Node.js 代码中调用 S3Client 及各类 S3 命令,如列举对象和读取对象内容;凭证通过 AWS SDK 默认凭证链解析。

panthrocorp
panthrocorp
热度 47.94
最近更新 2026-05-18 11:39:22
分类:开发依赖:代码执行 / 第三方 API应用场景:API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add panthrocorp-aws-s3
Metadata
name
AWS S3
description
Self-contained AWS S3 SDK bundle for OpenClaw agents
version
0.2.1
author
panthrocorp
license
MIT-0
metadata
{"openclaw":{"requires":{"npm":["@openclaw/aws-s3"]},"emoji":"🪣","homepage":"https://github.com/PanthroCorp-Limited/openclaw-skills","os":["linux"]}}

AWS S3 Skill

Pre-bundled AWS S3 SDK for use inside the OpenClaw gateway container. All transitive dependencies are bundled. No internet access required at install time.

Installation

Install from the release tarball into the gateway container:

TAG=$(curl -fsSL "https://api.github.com/repos/PanthroCorp-Limited/openclaw-skills/releases" \
  | grep -o '"tag_name":"aws-s3/v[^"]*"' | head -1 | cut -d'"' -f4)
VERSION=${TAG#aws-s3/v}
URL="https://github.com/PanthroCorp-Limited/openclaw-skills/releases/download/${TAG}/openclaw-aws-s3-${VERSION}.tgz"
docker exec openclaw-gateway npm install "$URL" --prefix /home/node/.openclaw/bin/.npm-global

Or from a downloaded tarball:

docker exec openclaw-gateway npm install /path/to/openclaw-aws-s3-0.1.0.tgz \
  --prefix /home/node/.openclaw/bin/.npm-global

Usage

const { S3Client, ListObjectsV2Command, GetObjectCommand } = require("@openclaw/aws-s3");

const client = new S3Client({});

const list = await client.send(new ListObjectsV2Command({
  Bucket: process.env.EMAIL_BUCKET_NAME,
  Prefix: `parsed/${agentName}/`,
}));

const obj = await client.send(new GetObjectCommand({
  Bucket: process.env.EMAIL_BUCKET_NAME,
  Key: "parsed/agent/email.json",
}));
const body = await obj.Body.transformToString();

Authentication

Credentials resolve via the AWS SDK default credential provider chain. In an EC2/ECS environment this uses IMDS (Instance Metadata Service) automatically. Ensure the IMDS hop limit is set to 2 or higher when running inside Docker.

No environment variables are required for authentication. AWS_REGION should be set if the region cannot be inferred from instance metadata.

Important

  • This package bundles @aws-sdk/client-s3 with all transitive dependencies.
  • No network access is needed at install time.
  • The gateway container must have Node.js available.
  • All S3 commands from the SDK are available, not just the ones shown above.