amplify-cli: Why OpenSearchStreamingLambdaFunction does not have app name prefix and current env suffix?

Which Category is your question related to? API

Amplify CLI Version 7.6.7

What AWS Services are you utilizing? Amplify

Provide additional details e.g. code snippets Pushing minor updates in schema caused changing search lambda name to OpenSearchStreamingLambdaFunction - without app name or environment. Is this expected behaviour? Trying to push to production now causes error:

OpenSearchStreamingLambdaFunction already exists in stack

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 20 (4 by maintainers)

Most upvoted comments

If possible, can someone from Amplify team recommend a workaround, e.g. do we downgrade the CLI version?

Customers unable to deploy to production environments should be treated as a high-severity issue

Please deploy the fix ASAP, downgrading to 7.6.5 introduces other issues and is not an acceptable workaround

I’ve got the same issue.

As of 7.6.7, it changes the previous OpenSearchStreamingLambda function from amplify-<appName>-<env>-OpenSearchStreamingLambd-<someId> to OpenSearchStreamingLambdaFunction, without any other identifier.

I updated my dev env, but I can no longer push to prod, due to the error: Following resources failed Resource Name: amplify-<appName>-<env>-OpenSearchStreamingLambd-<someId> (AWS::Lambda::Function) Event Type: update Reason: OpenSearchStreamingLambdaFunction already exists in stack <LambdaArn>

@Rafcin I don’t think the fix has been released yet, 7.6.9 was released 21 hours ago, but the fix was only merged 9 hours ago

Edit I’m stupid, ignore this. Thank you.

I don’t wanna be that guy, but 7.6.9 gave me some funky IAM/OS errors 😦

UPDATE_FAILED               OpenSearchStreamingLambdaFunction6ED4A1FD                               AWS::Lambda::Function      Thu Jan 13 2022 16:56:13 GMT-0800 (Pacific Standard Time) OpenSearchStreamingLambdaFunction already exists in stack arn:aws:cloudformation:us-west-2:707129987630:stack/amplify-fox-prod-174207-apifox-1XCP8S1CGPDTM-SearchableStack-16OIOH0271T9U/63e749e0-263f-11ec-baa0-0a7614ed120d
UPDATE_FAILED               OpenSearchAccessIAMRole6A1D9CC5                                         AWS::IAM::Role             Thu Jan 13 2022 16:56:13 GMT-0800 (Pacific Standard Time) Resource creation cancelled                                                                                                                                                                                                  
UPDATE_ROLLBACK_IN_PROGRESS amplify-fox-dev-160955-apifox-Y0QXBP993EX1-SearchableStack-TV78E7975PIC AWS::CloudFormation::Stack Thu Jan 13 2022 16:56:14 GMT-0800 (Pacific Standard Time) The following resource(s) failed to update: [OpenSearchAccessIAMRole6A1D9CC5, OpenSearchStreamingLambdaFunction6ED4A1FD].                                                                                                    
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED               SearchableStack                            AWS::CloudFormation::Stack Thu Jan 13 2022 16:56:19 GMT-0800 (Pacific Standard Time) Embedded stack arn:aws:cloudformation:us-west-2:707129987630:stack/amplify-fox-dev-160955-apifox-Y0QXBP993EX1-SearchableStack-TV78E7975PIC/ec47cd50-263a-11ec-bcd6-0a9127743e0d was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [OpenSearchAccessIAMRole6A1D9CC5, OpenSearchStreamingLambdaFunction6ED4A1FD]. 
UPDATE_ROLLBACK_IN_PROGRESS amplify-fox-dev-160955-apifox-Y0QXBP993EX1 AWS::CloudFormation::Stack Thu Jan 13 2022 16:56:20 GMT-0800 (Pacific Standard Time) The following resource(s) failed to update: [SearchableStack].                                                                                                                                                                                                                                                                                                                                
⠙ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED               apifox                 AWS::CloudFormation::Stack Thu Jan 13 2022 16:56:34 GMT-0800 (Pacific Standard Time) Embedded stack arn:aws:cloudformation:us-west-2:707129987630:stack/amplify-fox-dev-160955-apifox-Y0QXBP993EX1/bbfb9af0-263a-11ec-9178-0682b490ec17 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [SearchableStack].