Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate-config error. JSON files not found upgrading from 1.11.0 to 1.11.1 #721

Open
1 task
iaawsmanagement opened this issue Feb 19, 2025 · 3 comments
Open
1 task
Labels
bug Something isn't working

Comments

@iaawsmanagement
Copy link

Describe the bug
Ran the installer pipeline to upgrade fro m1.11.0 to 1.11.1. Update succeeds. when running the AWSAccelerator-Pipeline, it errors out in the build phase during validate-config step

To Reproduce
error occurs every time I run the pipeline

Expected behavior
A clear and concise description of what you expected to happen.

Please complete the following information about the solution:

  • [ 1.11.1] Version: [e.g. v1.5.1] Version 1.11.1

To get the version of the solution, you can look at the description of the created AWS CloudFormation stack used to install the LZA (AWSAccelerator-InstallerStack). For example, "(SO0199) Landing Zone Accelerator on AWS. Version 1.5.1.". If the description does not contain the version information, you can look at the Parameters of the stack for the RepositoryBranchName as that should contain the version number.

  • [us-east-2 ] Region: [e.g. us-east-1]
  • [ no] Was the solution modified from the version published on this repository?
  • [n/a ] If the answer to the previous question was yes, are the changes available on GitHub?
  • [yes ] Have you checked your service quotas for the services this solution uses?
  • Were there any errors in the CloudWatch Logs?

Screenshots
log:

[Container] 2025/02/19 15:26:42.871548 Running command yarn validate-config $CODEBUILD_SRC_DIR_Config -- 1235 | yarn run v1.22.22 1236 | $ ts-node ./packages/@aws-accelerator/accelerator/lib/config-validator.ts /codebuild/output/src1404/src/s3/01 1237 | 2025-02-19 15:26:44.707 \| info \| config-validator \| Found replacement variables in global-config.yaml 1238 | 2025-02-19 15:26:44.708 \| info \| config-validator \| Config source directory - /codebuild/output/src1404/src/s3/01 1239 | 2025-02-19 15:26:45.007 \| info \| replacements-config \| Loading replacements config substitution values 1240 | 2025-02-19 15:26:45.379 \| info \| accounts-config-validator \| accounts-config.yaml file validation started 1241 | 2025-02-19 15:26:45.380 \| info \| global-config-validator \| global-config.yaml file validation started 1242 | 2025-02-19 15:26:45.381 \| info \| iam-config-validator \| iam-config.yaml file validation started 1243 | 2025-02-19 15:26:45.383 \| info \| network-config-validator \| network-config.yaml file validation started 1244 | 2025-02-19 15:26:45.492 \| info \| organization-config-validator \| organization-config.yaml file validation started 1245 | 2025-02-19 15:26:45.492 \| info \| security-config-validator \| security-config.yaml file validation started 1246 | 2025-02-19 15:26:45.496 \| info \| replacement-config-validator \| replacements-config.yaml file validation started 1247 | 2025-02-19 15:26:45.497 \| warn \| config-validator \| Config file validation failed !!! 1248 | 2025-02-19 15:26:45.515 \| warn \| config-validator \| ENOENT: no such file or directory, open '/codebuild/output/src1404/src/s3/01/dynamic-partitioning/log-filters.json' 1249 | 2025-02-19 15:26:45.527 \| warn \| config-validator \| iam-config.yaml has 2 issues: 1250 | Policy definition file iam-policies/boundary-policy.json not found, for Default-Boundary-Policy !!! 1251 | Policy definition file iam-policies/iam-user-boundary-policy.json not found, for IAM-User-Boundary-Policy !!! 1252 | 2025-02-19 15:26:45.529 \| warn \| config-validator \| ENOENT: no such file or directory, open '/codebuild/output/src1404/src/s3/01/vpc-endpoint-policies/default.json' 1253 | 2025-02-19 15:26:45.530 \| warn \| config-validator \| ENOENT: no such file or directory, open '/codebuild/output/src1404/src/s3/01/service-control-policies/scp-accelerator1.json' 1254 | 2025-02-19 15:26:45.531 \| warn \| config-validator \| security-config.yaml has 14 issues: 1255 | SSM document Accelerator-SSM-ELB-Enable-Logging template file ssm-documents/ssm-elb-enable-logging.yaml not found !!! 1256 | SSM document Accelerator-Put-S3-Encryption template file ssm-documents/s3-encryption.yaml not found !!! 1257 | SSM document Accelerator-Attach-IAM-Instance-Profile template file ssm-documents/attach-iam-instance-profile.yaml not found !!! 1258 | SSM document Accelerator-Attach-IAM-Role-Policy template file ssm-documents/attach-iam-role-policy.yaml not found !!! 1259 | SSM document Accelerator-S3-Enforce-HTTPS template file ssm-documents/s3-enforce-https.yaml not found !!! 1260 | Custom rule: accelerator-attach-ec2-instance-profile lambda function file custom-config-rules/attach-ec2-instance-profile.zip not found 1261 | Custom rule: accelerator-attach-ec2-instance-profile lambda function role policy file custom-config-rules/attach-ec2-instance-profile-detection-role.json not found 1262 | Custom rule: accelerator-ec2-instance-profile-permission lambda function file custom-config-rules/ec2-instance-profile-permissions.zip not found 1263 | Custom rule: accelerator-ec2-instance-profile-permission lambda function role policy file custom-config-rules/ec2-instance-profile-permissions-detection-role.json not found 1264 | Rule: accelerator-attach-ec2-instance-profile, remediation assume role definition file custom-config-rules/attach-ec2-instance-profile-remediation-role.json not found 1265 | Rule: accelerator-ec2-instance-profile-permission, remediation assume role definition file custom-config-rules/ec2-instance-profile-permissions-remediation-role.json not found 1266 | Rule: accelerator-s3-bucket-server-side-encryption-enabled, remediation assume role definition file custom-config-rules/bucket-sse-enabled-remediation-role.json not found 1267 | Rule: accelerator-s3-bucket-enforce-https, remediation assume role definition file custom-config-rules/bucket-enforce-https-remediation-role.json not found 1268 | Rule: accelerator-elb-logging-enabled, remediation assume role definition file custom-config-rules/elb-logging-enabled-remediation-role.json not found 1269 | error Command failed with exit code 1. 1270 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 1271 |   1272 | [Container] 2025/02/19 15:26:45.574252 Command did not exit successfully yarn validate-config $CODEBUILD_SRC_DIR_Config exit status 1 1273 | [Container] 2025/02/19 15:26:45.577900 Phase complete: BUILD State: FAILED 1274 | [Container] 2025/02/19 15:26:45.577917 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: yarn validate-config $CODEBUILD_SRC_DIR_Config. Reason: exit status 1

Additional context
Add any other context about the problem here.

@iaawsmanagement iaawsmanagement added the bug Something isn't working label Feb 19, 2025
@iaawsmanagement
Copy link
Author

Additional Information:
looking at the cloudformation stacks, I see that AWSAccelerator-InstallerStack was updated to 1.11.1.
AWSAccelerator-CDKToolkit still has the original date when it was run, not the updated date. the Template shows 1.11.0

Do I need to manually run this stack? is this related to the other issue I saw regarding the CDK bootstrap?

@iaawsmanagement
Copy link
Author

Additional information. I'm able to run a successful AWSAccelerator-pipeline run with the supplied config files in S3. If I try to use the config files from the LZA for Healthcare sample, I receive the above errors. I'm zipping up the yaml config files from LZA for HC and uploading them to the S3 bucket zipped folder.

@Athanasii
Copy link
Contributor

Hello @iaawsmanagement , thank you for filing an issue with the Landing Zone Accelerator team!

Please see if this resolves your problem: https://docs.aws.amazon.com/solutions/latest/landing-zone-accelerator-on-aws/problem-configuration-file-not-found-issue.html

If needed, here are some helper scripts that can assist in troubleshooting: https://awslabs.github.io/landing-zone-accelerator-on-aws/latest/developer-guide/scripts/#helper-scripts

Let us know if this helps.

Thanks, and we look forward to hearing back from you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants