Skip to content

Fix: CFn improperly formats account_id causing IAM engine to fail when using cdk #11624

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

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

Morijarti
Copy link
Contributor

Motivation

  • Currently CFn will inproperly format account id to int 0 instead of keeping it 000000000000 string

Changes

  • Removed casting of account_id to int

Testing

  • Running cdklocal boostrap with IAM enabled and then trying to deploy a stack will cause IAM to crash

TODO

What's left to do:

  • make sure that other account ids are not cast to int (when using cross account permissions in template)
  • validate that boostraping and template deploying works with IAM enabled

@Morijarti Morijarti added aws:cloudformation AWS CloudFormation semver: patch Non-breaking changes which can be included in patch releases labels Oct 2, 2024
@Morijarti Morijarti added this to the 4.0 milestone Oct 2, 2024
@Morijarti Morijarti self-assigned this Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

LocalStack Community integration with Pro

  2 files  ±    0    2 suites  ±0   19m 3s ⏱️ - 1h 22m 2s
409 tests  - 3 071  293 ✅  - 2 773  116 💤  - 298  0 ❌ ±0 
411 runs   - 3 071  293 ✅  - 2 773  118 💤  - 298  0 ❌ ±0 

Results for commit 07e08d4. ± Comparison against base commit 5d2c090.

This pull request removes 3072 and adds 1 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.cloudformation.api.test_changesets ‑ test_create_delete_create

♻️ This comment has been updated with latest results.

@Morijarti Morijarti marked this pull request as ready for review October 4, 2024 11:48
Copy link
Member

@pinzon pinzon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Morijarti Morijarti merged commit eb9600f into master Oct 7, 2024
35 checks passed
@Morijarti Morijarti deleted the fix/cfn_invalid_conversion_of_account_id_to_int branch October 7, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:cloudformation AWS CloudFormation semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants