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

removing CloudWatchLambdaInsightsExecutionRolePolicy causes an error #2887

Closed
aprilmintacpineda opened this issue May 17, 2021 · 3 comments
Closed
Labels

Comments

@aprilmintacpineda
Copy link

aprilmintacpineda commented May 17, 2021

Description:

All I did was remove CloudWatchLambdaInsightsExecutionRolePolicy When I tried to deploy, I got this:

Waiting for changeset to be created..
Error: Failed to create changeset for the stack: myapp-dev, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined.

I did not change anything related to Fn::Join or !Join, simply removed CloudWatchLambdaInsightsExecutionRolePolicy from all my functions. Deployment was successful prior to this change, and the error message is not specific.

Steps to reproduce:

  1. Create 10 functions with CloudWatchLambdaInsightsExecutionRolePolicy and make some of them have LambdaInvokePolicy.
  2. Deploy.
  3. Remove CloudWatchLambdaInsightsExecutionRolePolicy
  4. Deploy.

Observed result:

It results in a vague error.

Expected result:

Should not even cause an error -- also the error message should be more specific.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Linux, using Github Actions
  2. sam --version: SAM CLI, version 1.23.0
  3. AWS region: ap-southeast-1

Add --debug flag to command you are running

N/A

EDIT 1:

Adding --debug does not help

@c2tarun
Copy link
Contributor

c2tarun commented Oct 4, 2021

Reason: Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined.

Based on above error it looks like there is some issue with your template. If you are still facing this issue can you please share your template.

@aprilmintacpineda
Copy link
Author

Reason: Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined.

Based on above error it looks like there is some issue with your template. If you are still facing this issue can you please share your template.

It wasn't the template, I solved this problem by removing the lambda functions from the template, then re-adding them again without the cloud watch lambda insight policy.

@wchengru
Copy link
Contributor

Close this issue since the problem is resolved, please feel free to reopen it if you have more questions on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants