SAR-Lambda-Janitor icon indicating copy to clipboard operation
SAR-Lambda-Janitor copied to clipboard

New parameter RoleArn for use during CloudFormation compatibility

Open rchekaluk opened this issue 2 years ago • 1 comments

When following the instructions to run SAR-Lambda-Janitor via CloudFormation, CloudFormation throws the following error:

Embedded stack arn:aws:cloudformation:REGION:000000000000:stack/SAR-Lambda-Janitor-SARLambdaJanitor-XXXXXXXXXXXX/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee was not successfully created: The following resource(s) failed to create: [CleanRole].

According to the AWS::Serverless::Function documentation, the Role property "is required in AWS CloudFormation but not in AWS SAM. If a role isn't specified, one is created for you with a logical ID of <function-logical-id>Role."

This change adds a new optional parameter RoleArn that can be used to provide the arn of an existing role when using via CloudFormation.

Syntax checked only; it has not been checked in execution.

rchekaluk avatar Sep 30 '22 13:09 rchekaluk

hey, looks like the problem is that one of the IAM role was not created (if you can look at the CloudFormation stack hopefully it'll show you more info).

When you're on this screen, did you click the box I acknowledge that this app creates custom IAM roles.?

image

theburningmonk avatar Oct 01 '22 09:10 theburningmonk