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

Parameters: [bucketName] must have values #955

Closed
brylie opened this issue Feb 27, 2019 · 22 comments
Closed

Parameters: [bucketName] must have values #955

brylie opened this issue Feb 27, 2019 · 22 comments

Comments

@brylie
Copy link

@brylie brylie commented Feb 27, 2019

Describe the bug
When adding hosting to a project and running the amplify publish, the command fails with the following:

CREATE_FAILED hostingS3AndCloudFront AWS::CloudFormation::Stack ... Parameters: [bucketName] must have values

My parameters.json looks like this:

{
    "bucketName": "suggested-bucket-name-20190227121241-hostingbucket"
}

To Reproduce

  1. issue amplify add hosting
  2. use default values offered
  3. run amplify publish

Expected behavior
I expected the app to be published successfully.

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Feb 27, 2019

Here is full console log:

$ amplify push

Current Environment: NONE

| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Hosting  | S3AndCloudFront | Create    | awscloudformation |
? Are you sure you want to continue? Yes
⠦ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS frontendpoc-20190208162455 AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:11 GMT+0200 (EET) User Initiated
CREATE_IN_PROGRESS hostingS3AndCloudFront     AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:16 GMT+0200 (EET)               
⠦ Updating resources in the cloud. This may take a few minutes...

CREATE_FAILED hostingS3AndCloudFront AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:16 GMT+0200 (EET) Parameters: [bucketName] must have values
⠏ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_IN_PROGRESS default-bucket-name-20190208162455 AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:17 GMT+0200 (EET) The following resource(s) failed to create: [hostingS3AndCloudFront].
⠙ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS default-bucket-name-20190208162455 AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:29 GMT+0200 (EET) 
⠙ Updating resources in the cloud. This may take a few minutes...

DELETE_COMPLETE          hostingS3AndCloudFront     AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:31 GMT+0200 (EET) 
UPDATE_ROLLBACK_COMPLETE default-bucket-name-20190208162455 AWS::CloudFormation::Stack Wed Feb 27 2019 12:26:31 GMT+0200 (EET) 
⠹ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
⠴ Updating resources in the cloud. This may take a few minutes...

Following resources failed

✖ An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
@elorzafe elorzafe transferred this issue from aws-amplify/amplify-js Feb 27, 2019
@yuth yuth added the investigating label Feb 28, 2019
@yuth

This comment has been minimized.

Copy link
Contributor

@yuth yuth commented Feb 28, 2019

@brylie what version of Amplify CLI do you have installed? You can determine the version number by running amplify -v

From the logs, it looks like your project was initialized using CLI prior to V1 and you're pushing the changes after updating your CLI that supports multienv.

Did you add the hosting after updating the CLI or before the update?

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Feb 28, 2019

$ amplify -v
1.1.6

I ran the upgrade process when Amplify detected that I had initialized the project with an older version.

I added hosting after initializing and upgrading the project.

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Feb 28, 2019

I tried again today, removing all Amplify resources from the project, and then re-adding hosting. However, the process fails again, with a different error:

$ amplify status

Current Environment: NONE

| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | --------------- |


$ amplify add hosting
? Select the environment setup: DEV (S3 only with HTTP)
? hosting bucket name project-20190228123211-hostingbucket
? index doc for the website index.html
? error doc for the website index.html

You can now publish your app using the following command:
Command: amplify publish

$ amplify publish

Current Environment: NONE

| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Hosting  | S3AndCloudFront | Create    | awscloudformation |
? Are you sure you want to continue? Yes
⠏ Updating resources in the cloud. This may take a few minutes...

CREATE_IN_PROGRESS hostingS3AndCloudFront     AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:20 GMT+0200 (Eastern European Standard Time)               
UPDATE_IN_PROGRESS project-20190208162455 AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:15 GMT+0200 (Eastern European Standard Time) User Initiated
⠋ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS project-20190208162455 AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:24 GMT+0200 (Eastern European Standard Time)                                                                      
UPDATE_ROLLBACK_IN_PROGRESS                  project-20190208162455 AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:22 GMT+0200 (Eastern European Standard Time) The following resource(s) failed to create: [hostingS3AndCloudFront].
CREATE_FAILED                                hostingS3AndCloudFront     AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:21 GMT+0200 (Eastern European Standard Time) Parameters: [bucketName] must have values                            
⠇ Updating resources in the cloud. This may take a few minutes...

DELETE_COMPLETE hostingS3AndCloudFront AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:26 GMT+0200 (Eastern European Standard Time) 
⠹ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE project-20190208162455 AWS::CloudFormation::Stack Thu Feb 28 2019 12:33:26 GMT+0200 (Eastern European Standard Time) 
⠧ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
⠇ Updating resources in the cloud. This may take a few minutes...

Following resources failed

✖ An error occurred when pushing the resources to the cloud
@bitIO

This comment has been minimized.

Copy link

@bitIO bitIO commented Feb 28, 2019

This also happens to me when using different cli versions. In one computer, amplify-cli works for the project I'm building with version 1.1.3 but, in the laptop, after cloning the repo, install packges, etc when adding a function I got the message for all the parameter of every resource that has been created before. Just my 2 cents

@UnleashedMind

This comment has been minimized.

Copy link
Contributor

@UnleashedMind UnleashedMind commented Feb 28, 2019

@brylie
It might be because your amplify cli is not properly updated, could you go through these steps to update it again?

  • npm remove -g @aws-amplify/cli
  • npm cache clean
  • npm install -g @aws-amplify/cli@latest

If you are just practicing, try to run amplify init on a new project and then add the hosting category.
The CLI does have the capability to migrate project setup from its older versions though, so that shouldn't be a big concern.

@bitIO

This comment has been minimized.

Copy link

@bitIO bitIO commented Mar 1, 2019

@UnleashedMind so, if the project we are working on is not just a toy, we should not be using updated versions from the one we used to create it? I mean, right now, I can't use it having versions 1.1.3 and 1.1.6 😕

@UnleashedMind

This comment has been minimized.

Copy link
Contributor

@UnleashedMind UnleashedMind commented Mar 4, 2019

@bitIO that's not what I meant, you should go ahead and update the CLI version, but make sure your update is complete.
We couldn't reproduce the issue, so we suspect that there might be some problem with the cli installation, so we suggested to re-install it.

@UnleashedMind

This comment has been minimized.

Copy link
Contributor

@UnleashedMind UnleashedMind commented Mar 5, 2019

@brylie
Do you still have this issue?
If you don't see this issue anymore, please close it.

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Mar 6, 2019

Well, I will try to deploy again today. Otherwise, we are considering just deploying with Jenkins.

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Mar 6, 2019

I tried again with CLI 1.1.7, updating the project when prompted:

peek 2019-03-06 09-58

For whatever reason, it is not creating or finding the S3 bucket when running amplify publish after adding hosting.

@UnleashedMind

This comment has been minimized.

Copy link
Contributor

@UnleashedMind UnleashedMind commented Mar 6, 2019

I see the cli has successfully migrated your project to be used with the latest CLI version.
There's only an auth category after the migration.
Could you run amplify hosting add after the migration? and then do a amplify push?

@kaustavghosh06

This comment has been minimized.

Copy link
Contributor

@kaustavghosh06 kaustavghosh06 commented Apr 12, 2019

Closing this issue due to lack of requester comments and abiity to not reproduce this behavior with the latest version of the CLI. Please feel free to re-open this if you're still sseeing the issue.

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Apr 13, 2019

Could you run amplify hosting add after the migration? and then do a amplify push?

If you notice, amplify add hosting is the first command issued in the animated GIF. It then proceeds to upgrade the project. The previous comments in this thread indicate what happens when running amplify push after the amplify add hosting command. Those steps are also indicated in the issue description.

@dysc

This comment has been minimized.

Copy link

@dysc dysc commented May 8, 2019

I am still getting this issue with v1.6.4-v1.6.8

@dperconti

This comment has been minimized.

Copy link

@dperconti dperconti commented May 19, 2019

I am getting this error as well with v1.6.9

UPDATE_FAILED               authcognito367bef3a    AWS::CloudFormation::Stack Sat May 18 2019 23:13:31 GMT-0700 (Pacific Daylight Time) Parameters: [authRoleArn, usernameAttributes, autoVerifiedAttributes, unauthRoleName, allowUnauthenticatedIdentities, smsVerificationMessage, userpoolClientReadAttributes, mfaTypes, emailVerificationSubject, useDefault, openIdLambdaIAMPolicy, userpoolClientGenerateSecret, mfaConfiguration, userpoolClientLogPolicy, openIdRolePolicy, identityPoolName, openIdLogPolicy, authSelections, smsAuthenticationMessage, roleExternalId, mfaLambdaLogPolicy, passwordPolicyMinLength, userPoolName, openIdLambdaRoleName, userpoolClientWriteAttributes, policyName, userpoolClientName, userpoolClientLambdaPolicy, resourceName, mfaLambdaIAMPolicy, mfaPassRolePolicy, emailVerificationMessage, userpoolClientRefreshTokenValidity, userpoolClientSetAttributes, unauthRoleArn, authRoleName, requiredAttributes, roleName, passwordPolicyCharacters, lambdaLogPolicy, userpoolClientLambdaRole, defaultPasswordPolicy, mfaLambdaRole] must have values
CREATE_FAILED               myApi             AWS::CloudFormation::Stack Sat May 18 2019 23:13:31 GMT-0700 (Pacific Daylight Time) Parameters: [S3DeploymentBucket, S3DeploymentRootKey] must have values
@LoganArnett

This comment has been minimized.

Copy link

@LoganArnett LoganArnett commented Jun 5, 2019

Still getting this in v1.7.0 as well, I can see in my nested config that the values I need are there before running amplify push or amplify publish but then are removed as the process is running which causes the error

@brylie

This comment has been minimized.

Copy link
Author

@brylie brylie commented Jun 5, 2019

I believe this issue should be re-opened, although not on my behalf. Rather, for other people who are experiencing the issue.

@Lasim

This comment has been minimized.

Copy link

@Lasim Lasim commented Aug 18, 2019

unfortunately I have the same problem.
I have created a new VueJS project with GraphQL APi.

Amplify Version: 1.12.0

$ amplify push

UPDATE_ROLLBACK_IN_PROGRESS test-graphql-multi-prod-20190818144634 AWS::CloudFormation::Stack Sun Aug 18 2019 14:48:00 GMT+0200 (Mitteleuropäische Sommerzeit) The following resource(s) failed to create: [apitestGraphQLMulti].    
CREATE_FAILED               apitestGraphQLMulti                    AWS::CloudFormation::Stack Sun Aug 18 2019 14:47:59 GMT+0200 (Mitteleuropäische Sommerzeit) Parameters: [S3DeploymentBucket, S3DeploymentRootKey] must have values

@dabit3

This comment has been minimized.

Copy link
Member

@dabit3 dabit3 commented Sep 4, 2019

For anyone running into this issue after attempting to update an API, check amplify/.config/local-env-info.json to make sure the path is correct. I had moved my project and the path no longer was the right path.

@philohelp

This comment has been minimized.

Copy link

@philohelp philohelp commented Sep 8, 2019

Thanks a lot @dabit3 ! I had indeed renamed my project's directory. Such a tiny little change...

@PeteLatham-CothamTechnologies

This comment has been minimized.

Copy link

@PeteLatham-CothamTechnologies PeteLatham-CothamTechnologies commented Dec 11, 2019

Thank you @dabit3 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.