@wraps.dev/cli 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -0
- package/dist/cli.js +5912 -4838
- package/dist/cli.js.map +1 -1
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/sms-event-processor/.bundled +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -600,6 +600,91 @@ packages/cli/
|
|
|
600
600
|
└── lambda/ # Lambda source for deployment
|
|
601
601
|
```
|
|
602
602
|
|
|
603
|
+
## AWS Permissions
|
|
604
|
+
|
|
605
|
+
Wraps needs specific IAM permissions to deploy and manage infrastructure in your AWS account. Use the `wraps permissions` command to see exactly what's required.
|
|
606
|
+
|
|
607
|
+
### Viewing Required Permissions
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
# Show permissions summary
|
|
611
|
+
wraps permissions
|
|
612
|
+
|
|
613
|
+
# Get full IAM policy JSON
|
|
614
|
+
wraps permissions --json
|
|
615
|
+
|
|
616
|
+
# Get permissions for specific preset
|
|
617
|
+
wraps permissions --preset production --json
|
|
618
|
+
|
|
619
|
+
# Get permissions for specific service
|
|
620
|
+
wraps permissions --service email --json
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Minimum Permissions by Preset
|
|
624
|
+
|
|
625
|
+
#### Starter Preset (~$0.05/mo)
|
|
626
|
+
- **IAM** - Role management for OIDC/credential handling
|
|
627
|
+
- **STS** - Credential validation
|
|
628
|
+
- **SES** - Email configuration and sending
|
|
629
|
+
- **CloudWatch** - Metrics access
|
|
630
|
+
|
|
631
|
+
#### Production Preset (~$2-5/mo)
|
|
632
|
+
All Starter permissions plus:
|
|
633
|
+
- **EventBridge** - Event routing
|
|
634
|
+
- **SQS** - Event queuing
|
|
635
|
+
- **Lambda** - Event processing
|
|
636
|
+
- **DynamoDB** - Email history storage
|
|
637
|
+
|
|
638
|
+
#### Enterprise Preset (~$50-100/mo)
|
|
639
|
+
All Production permissions plus:
|
|
640
|
+
- **IAM User Management** - SMTP credentials
|
|
641
|
+
|
|
642
|
+
### Optional Permissions
|
|
643
|
+
|
|
644
|
+
These permissions enhance functionality but are not required:
|
|
645
|
+
|
|
646
|
+
- **Route53** - Automatic DNS record management (can add records manually instead)
|
|
647
|
+
- **IAM OIDC Provider** - Only needed for Vercel deployments
|
|
648
|
+
|
|
649
|
+
### Creating an IAM Policy
|
|
650
|
+
|
|
651
|
+
1. Generate the policy JSON:
|
|
652
|
+
```bash
|
|
653
|
+
wraps permissions --json > wraps-policy.json
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
2. Create the policy in AWS Console:
|
|
657
|
+
- Go to IAM > Policies > Create Policy
|
|
658
|
+
- Select "JSON" tab
|
|
659
|
+
- Paste the policy content
|
|
660
|
+
- Name it "WrapsDeploymentPolicy"
|
|
661
|
+
|
|
662
|
+
3. Attach to your IAM user or role:
|
|
663
|
+
- Go to IAM > Users (or Roles)
|
|
664
|
+
- Select your user/role
|
|
665
|
+
- Add permissions > Attach policies
|
|
666
|
+
- Select "WrapsDeploymentPolicy"
|
|
667
|
+
|
|
668
|
+
### Using AWS Organizations / Permission Boundaries
|
|
669
|
+
|
|
670
|
+
If your organization uses permission boundaries or Service Control Policies (SCPs), ensure they allow:
|
|
671
|
+
|
|
672
|
+
```json
|
|
673
|
+
{
|
|
674
|
+
"Effect": "Allow",
|
|
675
|
+
"Action": [
|
|
676
|
+
"ses:*",
|
|
677
|
+
"iam:CreateRole",
|
|
678
|
+
"iam:PassRole",
|
|
679
|
+
"dynamodb:CreateTable",
|
|
680
|
+
"lambda:CreateFunction",
|
|
681
|
+
"events:PutRule",
|
|
682
|
+
"sqs:CreateQueue"
|
|
683
|
+
],
|
|
684
|
+
"Resource": ["arn:aws:*:*:*:wraps-*"]
|
|
685
|
+
}
|
|
686
|
+
```
|
|
687
|
+
|
|
603
688
|
## Troubleshooting
|
|
604
689
|
|
|
605
690
|
### AWS Credentials Not Found
|
|
@@ -612,6 +697,33 @@ aws configure
|
|
|
612
697
|
export AWS_PROFILE=your-profile
|
|
613
698
|
```
|
|
614
699
|
|
|
700
|
+
### SSO Session Expired
|
|
701
|
+
|
|
702
|
+
If using AWS SSO and you see "SSO session has expired":
|
|
703
|
+
|
|
704
|
+
```bash
|
|
705
|
+
# Re-authenticate with SSO
|
|
706
|
+
aws sso login
|
|
707
|
+
|
|
708
|
+
# Or with a specific profile
|
|
709
|
+
aws sso login --profile your-profile
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Permission Denied Errors
|
|
713
|
+
|
|
714
|
+
If you see permission errors during deployment:
|
|
715
|
+
|
|
716
|
+
1. Check required permissions:
|
|
717
|
+
```bash
|
|
718
|
+
wraps permissions --json
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
2. Verify your IAM user/role has the policy attached
|
|
722
|
+
|
|
723
|
+
3. Check for organization-level restrictions (SCPs)
|
|
724
|
+
|
|
725
|
+
4. If using assumed roles, ensure the trust policy allows your principal
|
|
726
|
+
|
|
615
727
|
### Invalid Region
|
|
616
728
|
|
|
617
729
|
Make sure you're using a valid AWS region:
|