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

##[error]Deployment failed: Error: Status: 403. Message: #28

Closed
af-gonzalez opened this issue Jun 13, 2020 · 17 comments
Closed

##[error]Deployment failed: Error: Status: 403. Message: #28

af-gonzalez opened this issue Jun 13, 2020 · 17 comments

Comments

@af-gonzalez
Copy link

af-gonzalez commented Jun 13, 2020

im runing a single container with dockerrun.aws.json

Hello guys in receiving that error when i use a new version label
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: vennly-player:develop
environment_name: vennly-player-develop-env
version_label: v1
region: us-east-2
deployment_package: deploy.zip

if i remove deployment_package property and use the running version as version label it works

but i need to run a new dockerrun.aws.json with an updated image name which is inside the zip file.

image

Any Ideas?

@einaregilsson
Copy link
Collaborator

I see you have a : in the application name. Wondering if that might be causing issues, I know we have issues uploading to S3 if there's a space in the name. Can you try with a test application without : in the name?

@omairvaiyani
Copy link

We have similar problems and my application has a space within it. I think the actual issue might be the access policy to the default generated bucket by beanstalk. Other CI pipelines tend to upload to a new S3 bucket with custom policies.

@juzhiyuan
Copy link

juzhiyuan commented Aug 12, 2020

I think it's due to the Signature Version, could we support setting version like v4 for this Action?

Just fixed by rebooting EC2.

@einaregilsson
Copy link
Collaborator

Rebooting EC2?

@juzhiyuan
Copy link

Yep, after rebooting EC2, and redeploy successfully.

@prowave
Copy link

prowave commented Sep 10, 2020

For me, this was an illegal character "$" in the filename.

@Mdelaf
Copy link

Mdelaf commented Sep 30, 2020

For the record:

  • Whitespace ( ) in the version_label also produces this error
  • Hashtag (#) in the version_label also produces this error
  • Hyphen (-) in the version-label and/or in the application_name works fine

Tested on version 13.

@einaregilsson
Copy link
Collaborator

@Mdelaf Thanks. In the next version I'll check for those and put out an error message saying what the problem is before starting the deployment.

@Mdelaf
Copy link

Mdelaf commented Nov 3, 2020

I found that this problem also shows up when using special characters on the version_description.

If you set version_description: ${{ github.event.head_commit.message }} the deployment may fail with error 403 occasionally, depending on your latest commit description.

In my case, I am using conventional commits for one of my projects. This commits have the following format: <type>(<scope>): <short summary>. I assume that either the parenthesis - ( and ) - or the colon - : - are responsible for the problem.

It's sad, because now I cannot have the latest commit in the version description.

It would be cool if you can have a look on this @einaregilsson

@einaregilsson
Copy link
Collaborator

@Mdelaf I've just published version 14, which allows :()! in the version description. Test and see if it works for you :)

It's kind of weird, because I have to use the encodeURIComponent() function to encode stuff, and then handle a few special cases myself, I can't use escape() which escapes every special character because AWS doesn't like that, so I end up with encodeURIComponent() plus a few special cases...

@Mdelaf
Copy link

Mdelaf commented Nov 5, 2020

I tested the version 14 today and it's working like a charm.

I appreciate this more than you'll ever know 😁 @einaregilsson

@mieszko4
Copy link

I had this problem when using new lines in version_description (I put there the entire commit message)

@sam-wiser
Copy link

@ symbol in the version_label also caused this error in v14

@einaregilsson
Copy link
Collaborator

Ok, I guess I have some things to look at for the next version. Some restrictions are because of S3 filenames, maybe I need to remove all bad characters from the file names but still allow them in the version label.

@sam-wiser
Copy link

Yep, it sure looked like the failing step was saving the S3 file with the special character in it. Looks like AWS says we should "likely" URL/hex encode a bunch of chars in the section "Characters that might require special handling": https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html

Really weirdly loose guidance on that page, how are we supposed to URL encode things without being able to use %? Why not just define which characters we cant use? >_<

@einaregilsson
Copy link
Collaborator

einaregilsson commented Feb 16, 2021

This should be fixed in version 16. We now change any characters that's not alphanumeric, a dash or and underscore in the S3 filename and replace it with a dash. But the version label in Elastic Beanstalk keeps all the special characters.

Screenshot 2021-02-16 at 11 13 16

This above is a version label with lots of special characters, below is the filename in S3:

Screenshot 2021-02-16 at 11 14 19

As for newlines in version_description, that should work now, there were some encoding issues there and we now also truncate the message to 200 characters if it's longer than that, otherwise Beanstalk rejects it.

So please, everyone try their problems again with v16 and report any issues that are still happening. The one thing that you cannot do with version_label is put a forward slash / in there, Elastic Beanstalk itself doesn't allow that.

@JoseLuisDelgadoCarrillo

Is anyone having the same problem as of today?
version_labels and version_descriptions don´t really appear to have issues or strange characters

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