n8n-nodes-aws-secrets
v1.0.0
Published
AWS Secrets Manager node for n8n
Downloads
3
Readme
n8n-nodes-aws-secrets
AWS Secrets Manager node for n8n - retrieve secrets dynamically in your workflows.
Features
- Retrieve secrets from AWS Secrets Manager
- Automatic JSON parsing for structured secrets
- Pass secrets dynamically to other nodes (SFTP, databases, APIs, etc.)
- Use AWS IAM credentials for secure access
Installation
Method 1: Community Node Installation (Recommended)
SSH into your n8n EC2 instance:
ssh -i your-key.pem [email protected]Copy the package to the EC2 instance: From your local machine:
cd /Users/chrismckenna/development/archtopPOC tar -czf n8n-nodes-aws-secrets.tar.gz n8n-nodes-aws-secrets/ scp -i your-key.pem n8n-nodes-aws-secrets.tar.gz [email protected]:/tmp/Install on the EC2 instance:
# SSH to EC2 ssh -i your-key.pem [email protected] # Extract and install cd /opt/n8n mkdir -p custom-nodes cd custom-nodes tar -xzf /tmp/n8n-nodes-aws-secrets.tar.gz cd n8n-nodes-aws-secrets # Install in n8n container docker exec -it n8n-n8n-1 sh -c "cd /tmp && npm install -g /home/node/.n8n/custom-nodes/n8n-nodes-aws-secrets" # Restart n8n cd /opt/n8n docker-compose restart n8nAccess n8n:
- URL: https://10.0.1.143
- Username: admin
- Password: testpassword123
Method 2: Volume Mount (Alternative)
Copy package to EC2:
scp -i your-key.pem -r n8n-nodes-aws-secrets [email protected]:/opt/n8n/custom-nodes/Update docker-compose.yml: Add volume mount:
n8n: volumes: - n8n-data:/home/node/.n8n - /opt/n8n/custom-nodes:/opt/custom-nodesRestart:
docker-compose down && docker-compose up -d
Usage
1. Create AWS Credentials
In n8n:
- Go to Credentials > New
- Select AWS Secrets Manager API
- Fill in:
- Region: us-east-1 (or your AWS region)
- Access Key ID: Your AWS access key
- Secret Access Key: Your AWS secret key
- Click Save
2. Add AWS Secrets Manager Node
- Create a new workflow
- Add the AWS Secrets Manager node
- Select your credentials
- Configure:
- Secret Name: e.g.,
datalake/sftp/credentials - Parse JSON: Enable if secret is JSON format
- Secret Name: e.g.,
3. Use Secret Values in Other Nodes
The node outputs all secret fields as top-level JSON properties. Access them using expressions:
Example - SFTP Node:
Host: {{ $json.host }}
Port: {{ $json.port }}
Username: {{ $json.username }}
Password: {{ $json.password }}Example Secret Structure in AWS:
{
"host": "sftp.example.com",
"port": 22,
"username": "dataloader",
"password": "secure_password_123"
}4. Complete Workflow Example: SFTP → S3
[AWS Secrets] → [SFTP Download] → [S3 Upload]AWS Secrets Manager Node:
- Secret Name:
datalake/sftp/credentials - Parse JSON: ✓
- Secret Name:
SFTP Node:
- Operation: Download
- Path:
/data/*.csv - Host:
{{ $json.host }} - Port:
{{ $json.port }} - Username:
{{ $json.username }} - Password:
{{ $json.password }}
AWS S3 Node:
- Operation: Upload
- Bucket:
datalake-raw-data - File: Use binary data from SFTP
Node Output
The node outputs a JSON object with:
secretName: The name of the secret retrievedsecretValue: The raw secret value (if not JSON)versionId: AWS version ID of the secretcreatedDate: When the secret was created- Plus all parsed JSON fields at the top level
Example Output:
{
"secretName": "datalake/sftp/credentials",
"versionId": "abc123-def456",
"createdDate": "2025-01-15T12:00:00Z",
"host": "sftp.example.com",
"port": 22,
"username": "dataloader",
"password": "secure_password_123"
}Development
Build from Source
cd n8n-nodes-aws-secrets
npm install
npm run buildPackage Structure
n8n-nodes-aws-secrets/
├── credentials/
│ └── AwsSecretsApi.credentials.ts
├── nodes/
│ └── AwsSecrets/
│ ├── AwsSecrets.node.ts
│ └── awsSecrets.svg
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── gulpfile.jsTroubleshooting
Node Not Appearing in n8n
Check if the package was installed:
docker exec -it n8n-n8n-1 npm list -g | grep aws-secretsCheck n8n logs:
docker logs n8n-n8n-1Restart n8n:
docker-compose restart n8n
AWS Credentials Issues
- Ensure IAM user has
secretsmanager:GetSecretValuepermission - Verify region is correct
- Test credentials with AWS CLI:
aws secretsmanager get-secret-value --secret-id your-secret-name --region us-east-1
Cannot Access Secrets
- Check secret name is exact (case-sensitive)
- Verify secret exists in the specified region
- Review IAM permissions
License
MIT
Author
Archtop
