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

Impossible to create Resources form Cloudformation resource Summaries #2243

Open
Pymatteo opened this issue Dec 27, 2019 · 4 comments · May be fixed by dhx-mike-palandra/boto3#1
Open

Impossible to create Resources form Cloudformation resource Summaries #2243

Pymatteo opened this issue Dec 27, 2019 · 4 comments · May be fixed by dhx-mike-palandra/boto3#1
Labels
bug This issue is a confirmed bug. cloudformation p3 This is a minor priority issue resources

Comments

@Pymatteo
Copy link

There is a bug in the implementation of the cloud formation StackResourceSummary class which prevents the creation of StackResources by calling the Resource() sub-resource:

stack = cloudformation.Stack('MyStack')
resource_summary = list(stack.resource_summaries.all())[0]
resource_summary.dict
{'meta': ResourceMeta('cloudformation', identifiers=['stack_name', 'logical_id']), '_logical_id': 'Aurora', '_stack_name': 'MyStack'}
resource = list(stack.resource_summaries.all())[0].Resource()
resource.dict
{'meta': ResourceMeta('cloudformation', identifiers=['stack_name', 'logical_id']), '_stack_name': 'MyStack', '_logical_id': 'Aurora'}

stack_name and logical_id have been switched

resource.load()
Traceback (most recent call last):
File "", line 1, in
File "/home/matteo/.local/lib/python3.6/site-packages/boto3/resources/factory.py", line 505, in do_action
response = action(self, *args, **kwargs)
File "/home/matteo/.local/lib/python3.6/site-packages/boto3/resources/action.py", line 83, in call
response = getattr(parent.meta.client, operation_name)(**params)
File "/home/matteo/.local/lib/python3.6/site-packages/botocore/client.py", line 272, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/matteo/.local/lib/python3.6/site-packages/botocore/client.py", line 576, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the DescribeStackResource operation: Stack 'Aurora' does not exist

@swetashre swetashre self-assigned this Dec 27, 2019
@swetashre
Copy link
Contributor

Thank you for your post. I am able to reproduce the issue. Marking this as a bug.

@swetashre swetashre added bug This issue is a confirmed bug. resources labels Jan 10, 2020
@github-actions
Copy link

github-actions bot commented Jan 9, 2021

Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. Because it has been longer than one year since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment to prevent automatic closure, or if the issue is already closed, please feel free to reopen it.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jan 9, 2021
dhx-mike-palandra added a commit to dhx-mike-palandra/boto3 that referenced this issue Apr 19, 2021
This should fix boto#2243 which has been closed due to inactivity but which I encountered myself recently.
@kdaily kdaily reopened this May 7, 2021
@kdaily
Copy link
Member

kdaily commented May 7, 2021

Reopening on behalf of @dhx-mike-palandra, reported this is still an issue in #2828. I will check in with the CloudFormation team on this. Thanks!

@dhx-mike-palandra
Copy link

Thank you very much @kdaily. I just submitted another closely related issue: #2855. Since that issue involves the same model definition, and is even more essential for a properly functioning class at runtime, please consider checking in with the CloudFormation team about that one too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. cloudformation p3 This is a minor priority issue resources
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants