org-formation-cli icon indicating copy to clipboard operation
org-formation-cli copied to clipboard

Error trying to update the organization with new configuraiton

Open galaxy79 opened this issue 3 years ago • 4 comments

Subject of the issue

My aws account is in me-south-1 and was able to run the init operation successfully. When I do the update operation, I'm getting below error, ERROR: unable to load state, bucket: organization-formation-123456, key: state.json. Err: IllegalLocationConstraintException: The me-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.

I do see the bucket organization-formation-123456 created in my root account after the init operation. I don't see region option to be passed during the update operation. CAn you please let me know how to fix this?

Your environment

  • version of org-foramtion (ofn --version) :
  • version of node (node --version) : 14
  • which OS/distro : mac

Steps to reproduce

  1. Create an account in was me-south-1
  2. Run org-formation init command
  3. Verify and update the organization.yml created with new account
  4. Run org-formation update command AWSTemplateFormatVersion: '2010-09-09-OC' Description: default template generated for organization with master account 123456

Organization: MasterAccount: Type: OC::ORG::MasterAccount Properties: AccountName: Test AccountId: '123456' RootEmail: [email protected]

OrganizationRoot: Type: OC::ORG::OrganizationRoot Properties: DefaultOrganizationAccessRoleName: OrganizationAccountAccessRole

Expected behaviour

Update operation should be successful and create the new account

Actual behaviour

Below is after the update operation, ERROR: unable to load state, bucket: organization-formation-123456, key: state.json. Err: IllegalLocationConstraintException: The me-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.

galaxy79 avatar Feb 02 '22 20:02 galaxy79

thanks for sharing! I have not tried to run org-formation in me-south-1 yet. I will give this a try tomorrow. what might remediate the issue is to run the init command in another region eg using --region us-east-1. the location of the bucket can be changed later to me-south-1 manually.

will have a look at this later, looking forward to hear whether you run in other issues using me-south-1 too.

thanks

OlafConijn avatar Feb 02 '22 21:02 OlafConijn

I just tested the following in me-south-1

ofn init org.yml
<<make a change to org.yml>
ofn update org.yml

this seemed to work for me. were these the commands you used? perhaps the region was still in the process of being set up?

OlafConijn avatar Feb 03 '22 15:02 OlafConijn

Strange, the only difference I see is passing the --region as me-south-1 during init command. I will try again today and let you know.

galaxy79 avatar Feb 04 '22 13:02 galaxy79

Sorry for the delay. I tried again and it is throwing the same error, ERROR: unable to load state, bucket: organization-formation-123456, key: state.json. Err: IllegalLocationConstraintException: The me-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.

When I search with the error message, I see this issue in github, https://github.com/aws/aws-cli/issues/4445

This aws account only is being set up in the me-south-1 region. Also I'm using the docker image for running these commands with the alias

galaxy79 avatar Feb 10 '22 01:02 galaxy79