Comments (3)
This error is related to the statusMessage
being too large. This is because the entire policy is part of the payload. More than likely your policy is invalid and the back end API is having issues with it.
For instance this policy with invalid resources:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Action": [
"aps:*",
...(redacted)
],
"Resource": []
}
]
}
will result in the error
Value 'Invalid PermissionsPolicy Document ... at 'statusMessage' failed to satisfy constraint: Member must have length less than or equal to 1024
I've been able to create inline policies larger than 1024 without issues. I'm willing to re-open if I've missed something.
from cloudformation-coverage-roadmap.
@kddejong, thanks for the quick response. I appreciate the help.
Now I see two problems:
- My policy was invalid and Identity Center rejected it
- CloudFormation misled me by presenting irrelevant internal details
It's my job to fix the invalid policy.
I'd like the service team to improve the presentation of such errors.
Just this would have been fine:
Invalid PermissionsPolicy Document {...}. (Service: SsoAdmin, Status Code: 400, Request ID: ...)
This part misled me:
1 validation error detected: Value '...' at 'statusMessage' failed to satisfy constraint: Member must have length less than or equal to 1024
As a customer I don't want to see that CloudFormation has some limit of 1024. It still printed all the characters anyway!
Is that a good topic for a GitHub issue in this repo?
If not, I can use a support case to pass on the request.
from cloudformation-coverage-roadmap.
In case anyone else runs into this, I'll share how I solved it.
- Use cfn-policy-validator to parse all the policies out of the CloudFormation template and write them out in JSON
- Use jq to extract the inline policy from the modified permission set
- Use parliament to validate the inline policy and find the root cause
cfn-policy-validator parse --template-path ... --region ... --parameters ... > policies.json
jq < policies.json '
.
| .PermissionSets[] | select(.Name == "...")
| .Policies[] | select(.Name == "InlinePolicy")
| .Policy
' \
> inline_policy.json
parliament --json --file inline_policy.json | jq -s
In my case, the root cause was spaces in a new sid. Oops!
{
"issue": "INVALID_SID",
"title": "Invalid SID",
"severity": "LOW",
"description": "Statement Sid does match regex [0-9A-Za-z]*",
"detail": null,
"location": {
"string": "A long sid with spaces to make it readable",
"line": 4,
"column": 14,
"filepath": "inline_policy.json"
}
}
from cloudformation-coverage-roadmap.
Related Issues (20)
- Cognito UserPool MFA methods in Cloudformation HOT 1
- AWS::DynamoDB::GlobalTable - Issues creating global tables with Provisioned BillingMode tables
- Feature request to support AWS Inspector V2 activation using CloudFormation
- AWS::RDS::DBInstance - Add Support for BackupTarget
- AWS::InternetMonitor::Monitor initial `INACTIVE` status is not considered HOT 2
- Cloud Control ResourceRequestSuccess waiter should succeed when OperationStatus == 'CANCEL_COMPLETE` HOT 1
- AWS::DynamoDB::GlobalTable - GetAtt support for replica table attributes
- AWS::FSx::FileSystem - Add GetAtt for DNSName and IP address for ONTAP File System. HOT 1
- DeregisterScalableTarget for ApplicationAutoScaling
- DynamoDB resource policies as a separate resource
- Regional support for AWS::BillingConductor::* resources
- Update App Runner service without replacing tags
- [AWS::DMS::ReplicationConfig] Feature Request to support S3 URI of a JSON file for the TableMappings property in CloudFormation.
- aws-opensearchservice: Add OpenSearch custom package Resource and associated utils
- Missing AWS::ECS::TaskSet CapacityProviderStrategy attribute
- Missing AWS::CodeBuild::Fleet OverflowBehavior and ScalingConfiguration attributes
- Allow AWS::SecretsManager::Secret grace period
- AWS::EC2::InstanceConnectEndpoint DELETE_FAILED
- (AWS::EC2::LaunchTemplate) "Smart" drift detection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudformation-coverage-roadmap.