AWS Secrets Manager Setup
Store Trusted Signatures API credentials securely in AWS Secrets Manager for applications that invoke the AWS Cloud Connector.
- Secure API key storage
- IAM access control
- Rotation guidance
AWS proof
Use Lambda and S3 for connector speed, scale, and account-scoped control
The documented AWS pattern uses Lambda for invocation, S3 for document movement, and AWS-native IAM and secrets controls so teams can run sealing workflows inside their own account.
S3
speed path
Source and destination buckets let applications hand off PDFs and retrieve sealed output through the same storage workflow.
Lambda
scale model
The connector runs as a Lambda function, fitting bursty or event-driven document jobs without managing long-lived servers.
IAM
security controls
Least-privilege roles, bucket policies, and Secrets Manager guidance scope access to documents and credentials.
SHA-256
data boundary
Only the document digest and signing metadata are sent to Trusted Signatures while PDFs stay in S3.
AWS Secrets Manager Setup
Overview
CRITICAL: Store your Trusted Signatures API credentials in AWS Secrets Manager for maximum security in client applications that invoke the AWS Cloud Connector. Never hardcode API keys in your code or environment variables.
Note: The Lambda function itself receives API keys in each request and does not need Secrets Manager access. This guide is for client applications that need to store and retrieve API credentials securely.
Why Use Secrets Manager?
- Security: Encrypted storage with automatic rotation
- Access Control: IAM-based permissions
- Audit: CloudTrail logging of secret access
- Compliance: Meets security best practices
- Cost: Minimal cost (~$0.40/month per secret)
Setup Instructions
1. Create Secret in AWS Console
- Go to AWS Secrets Manager Console
- Click Store a new secret
- Choose Other type of secret
- Add key-value pairs:
- Key:
apiKey, Value:your-hex-encoded-api-key - Key:
apiKeyId, Value:your-api-key-id
- Key:
- Secret name:
trusted-signatures-api - Description:
Trusted Signatures API credentials for PDF sealing - Configure automatic rotation (recommended: 90 days)
- Click Store
2. Create Secret via AWS CLI
| |
3. Client Application Implementation
Client applications should retrieve credentials from Secrets Manager before invoking the Lambda:
| |
Security Best Practices
Access Control
Principle of Least Privilege:
| |
Monitoring
CloudWatch Alarms:
| |
Rotation
Automatic Rotation (Recommended):
- Enable automatic rotation in Secrets Manager
- Set rotation interval (30-90 days recommended)
- Update Trusted Signatures API keys accordingly
- Test rotation process in non-production environment
Cost Optimization
Caching Secrets
Cache secrets in Lambda to reduce API calls:
| |
Regional Considerations
- Store secrets in the same region as your Lambda
- Use VPC endpoints to avoid data transfer charges
- Consider cross-region replication for disaster recovery
Troubleshooting
Common Issues
Access Denied:
- Verify Lambda execution role has
secretsmanager:GetSecretValuepermission - Check secret resource ARN matches policy
- Ensure secret exists in the correct region
Secret Not Found:
- Verify secret name spelling
- Check if secret was deleted or moved
- Confirm region matches Lambda function region
Invalid Credentials:
- Verify secret contains correct
apiKeyandapiKeyId - Check if API keys have expired
- Test credentials directly with Trusted Signatures API
Debugging
Enable CloudTrail logging:
| |
Check Lambda logs:
| |
Migration from Hardcoded Keys
Step-by-Step Migration
- Create secret with current API credentials
- Update Lambda code to support both methods temporarily
- Test thoroughly with secret-based approach
- Remove hardcoded keys from code
- Update documentation and deployment scripts
Rollback Plan
Keep hardcoded keys as fallback during migration:
| |
Compliance
Audit Requirements
- CloudTrail: Enable logging for Secrets Manager API calls
- Access Reviews: Regular review of IAM permissions
- Rotation Records: Document key rotation schedule
- Incident Response: Plan for compromised credentials
Documentation
Maintain records of:
- Secret creation and updates
- IAM policy changes
- Rotation schedules
- Access patterns and anomalies
Security is critical to protecting your Trusted Signatures account. Always use AWS Secrets Manager for API credentials in production environments.
Need architectural review?
Book a technical walkthrough
For enterprise rollout, we can review trust model, controls, and integration patterns with your team.