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

Resource is not in the expected state due to waiter status: TIMEOUT #2277

Closed
ykethan opened this issue Nov 27, 2024 · 1 comment
Closed

Resource is not in the expected state due to waiter status: TIMEOUT #2277

ykethan opened this issue Nov 27, 2024 · 1 comment
Labels
bug Something isn't working dependency Issue related to upstream dependency

Comments

@ykethan
Copy link
Member

ykethan commented Nov 27, 2024

Environment information

System:
  OS: macOS 15.1.1
  CPU: (8) arm64 Apple M1
  Memory: 382.34 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.3.0 - ~/.nvm/versions/node/v20.3.0/bin/node
  Yarn: 1.22.21 - ~/.nvm/versions/node/v20.2.0/bin/yarn
  npm: 9.6.7 - ~/.nvm/versions/node/v20.3.0/bin/npm
  pnpm: 9.13.2 - ~/.nvm/versions/node/v20.2.0/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: 1.5.0
  @aws-amplify/backend: 1.8.0
  @aws-amplify/backend-auth: 1.4.1
  @aws-amplify/backend-cli: 1.4.2
  @aws-amplify/backend-data: 1.2.1
  @aws-amplify/backend-deployer: 1.1.10
  @aws-amplify/backend-function: 1.8.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.3
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.3
  @aws-amplify/cli-core: 1.2.0
  @aws-amplify/client-config: 1.5.2
  @aws-amplify/deployed-backend-client: 1.4.2
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.9
  @aws-amplify/platform-core: 1.2.2
  @aws-amplify/plugin-types: 1.5.0
  @aws-amplify/sandbox: 1.2.6
  @aws-amplify/schema-generator: 1.2.5
  aws-amplify: 6.10.0
  aws-cdk: 2.171.0
  aws-cdk-lib: 2.171.0
  typescript: 5.7.2
No AWS environment variables
No CDK environment variables

Describe the bug

When saving changes on a function the hotswap fails with Resource is not in the expected state due to waiter status: TIMEOUT error.
Th error appears to introduced in version CDK v2.167.0

Issue on CDK tracking this behavior: aws/aws-cdk#32219

workaround:

adding the following policy mitigates the issue:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AmplifyHotSwappableFunctionResource",
            "Effect": "Allow",
            "Action": [
                "lambda:GetFunctionConfiguration"
            ],
            "Resource": [
                "arn:aws:lambda:*:*:function:amplify-*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}

Reproduction steps

create a function
save changes

@ykethan ykethan added pending-triage Incoming issues that need categorization bug Something isn't working dependency Issue related to upstream dependency and removed pending-triage Incoming issues that need categorization labels Nov 27, 2024
@sobolk sobolk mentioned this issue Nov 27, 2024
4 tasks
@sobolk
Copy link
Member

sobolk commented Nov 27, 2024

This has been resolved now.

If you are running into this issue please make upgrade aws-cdk and aws-cdk-lib to 2.171.1 or above in your project.

@sobolk sobolk closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependency Issue related to upstream dependency
Projects
None yet
Development

No branches or pull requests

2 participants