Elasticbeanstalk create-application-version fails with S3 forbidden error
up vote
0
down vote
favorite
I'm attempting to use the aws cli tool
in our CI pipeline to deploy a new version of the application to elastic beanstalk
:
aws elasticbeanstalk create-application-version
--application-name "serradev dev"
--version-label $BUILDKITE_COMMIT
--source-bundle S3Bucket="$BUCKET_NAME",S3Key="$BUILDKITE_COMMIT.zip"
it is failing with the following error:
An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Unable to download from S3 location (Bucket: elastic-beanstalk-deploys Key: da25301fc88a5c2908282a891fb0f80278008a36.zip). Reason: Forbidden
If I replace the key with a non existent deployment I get a NotFound
error instead.
I have configured the following policy on the bucket
"Version": "2012-10-17",
"Id": "Policy1541741695771",
"Statement": [
"Sid": "eb-af163bf3-d27b-4712-b795-d1e33e331ca4",
"Effect": "Allow",
"Principal":
"AWS": [
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-service-role",
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-ec2-role"
]
,
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:PutObjectAcl",
"s3:GetObjectAcl",
"s3:GetBucketPolicy",
"s3:Get*"
],
"Resource": [
"arn:aws:s3:::elastic-beanstalk-deploys",
"arn:aws:s3:::elastic-beanstalk-deploys/*"
]
]
The file is copied to the bucket using the aws s3 cp
command :
aws s3 cp --acl=public-read $RUN_ARTIFACT_PATH/app.zip s3://$BUCKET_NAME/$BUILDKITE_COMMIT.zip
Note the addition of the --acl=public-read
switch.
I have even configured the bucket to have full public access and tested this by downloading the manifest file in an anonymous browser session. Despite all of these permissions being available, I continue to get a Forbidden
error.
At this point, I'm out of ideas of what to try next.
amazon-web-services amazon-s3 amazon-elastic-beanstalk
add a comment |
up vote
0
down vote
favorite
I'm attempting to use the aws cli tool
in our CI pipeline to deploy a new version of the application to elastic beanstalk
:
aws elasticbeanstalk create-application-version
--application-name "serradev dev"
--version-label $BUILDKITE_COMMIT
--source-bundle S3Bucket="$BUCKET_NAME",S3Key="$BUILDKITE_COMMIT.zip"
it is failing with the following error:
An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Unable to download from S3 location (Bucket: elastic-beanstalk-deploys Key: da25301fc88a5c2908282a891fb0f80278008a36.zip). Reason: Forbidden
If I replace the key with a non existent deployment I get a NotFound
error instead.
I have configured the following policy on the bucket
"Version": "2012-10-17",
"Id": "Policy1541741695771",
"Statement": [
"Sid": "eb-af163bf3-d27b-4712-b795-d1e33e331ca4",
"Effect": "Allow",
"Principal":
"AWS": [
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-service-role",
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-ec2-role"
]
,
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:PutObjectAcl",
"s3:GetObjectAcl",
"s3:GetBucketPolicy",
"s3:Get*"
],
"Resource": [
"arn:aws:s3:::elastic-beanstalk-deploys",
"arn:aws:s3:::elastic-beanstalk-deploys/*"
]
]
The file is copied to the bucket using the aws s3 cp
command :
aws s3 cp --acl=public-read $RUN_ARTIFACT_PATH/app.zip s3://$BUCKET_NAME/$BUILDKITE_COMMIT.zip
Note the addition of the --acl=public-read
switch.
I have even configured the bucket to have full public access and tested this by downloading the manifest file in an anonymous browser session. Despite all of these permissions being available, I continue to get a Forbidden
error.
At this point, I'm out of ideas of what to try next.
amazon-web-services amazon-s3 amazon-elastic-beanstalk
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm attempting to use the aws cli tool
in our CI pipeline to deploy a new version of the application to elastic beanstalk
:
aws elasticbeanstalk create-application-version
--application-name "serradev dev"
--version-label $BUILDKITE_COMMIT
--source-bundle S3Bucket="$BUCKET_NAME",S3Key="$BUILDKITE_COMMIT.zip"
it is failing with the following error:
An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Unable to download from S3 location (Bucket: elastic-beanstalk-deploys Key: da25301fc88a5c2908282a891fb0f80278008a36.zip). Reason: Forbidden
If I replace the key with a non existent deployment I get a NotFound
error instead.
I have configured the following policy on the bucket
"Version": "2012-10-17",
"Id": "Policy1541741695771",
"Statement": [
"Sid": "eb-af163bf3-d27b-4712-b795-d1e33e331ca4",
"Effect": "Allow",
"Principal":
"AWS": [
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-service-role",
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-ec2-role"
]
,
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:PutObjectAcl",
"s3:GetObjectAcl",
"s3:GetBucketPolicy",
"s3:Get*"
],
"Resource": [
"arn:aws:s3:::elastic-beanstalk-deploys",
"arn:aws:s3:::elastic-beanstalk-deploys/*"
]
]
The file is copied to the bucket using the aws s3 cp
command :
aws s3 cp --acl=public-read $RUN_ARTIFACT_PATH/app.zip s3://$BUCKET_NAME/$BUILDKITE_COMMIT.zip
Note the addition of the --acl=public-read
switch.
I have even configured the bucket to have full public access and tested this by downloading the manifest file in an anonymous browser session. Despite all of these permissions being available, I continue to get a Forbidden
error.
At this point, I'm out of ideas of what to try next.
amazon-web-services amazon-s3 amazon-elastic-beanstalk
I'm attempting to use the aws cli tool
in our CI pipeline to deploy a new version of the application to elastic beanstalk
:
aws elasticbeanstalk create-application-version
--application-name "serradev dev"
--version-label $BUILDKITE_COMMIT
--source-bundle S3Bucket="$BUCKET_NAME",S3Key="$BUILDKITE_COMMIT.zip"
it is failing with the following error:
An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Unable to download from S3 location (Bucket: elastic-beanstalk-deploys Key: da25301fc88a5c2908282a891fb0f80278008a36.zip). Reason: Forbidden
If I replace the key with a non existent deployment I get a NotFound
error instead.
I have configured the following policy on the bucket
"Version": "2012-10-17",
"Id": "Policy1541741695771",
"Statement": [
"Sid": "eb-af163bf3-d27b-4712-b795-d1e33e331ca4",
"Effect": "Allow",
"Principal":
"AWS": [
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-service-role",
"arn:aws:iam::185535608991:role/aws-elasticbeanstalk-ec2-role"
]
,
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:PutObjectAcl",
"s3:GetObjectAcl",
"s3:GetBucketPolicy",
"s3:Get*"
],
"Resource": [
"arn:aws:s3:::elastic-beanstalk-deploys",
"arn:aws:s3:::elastic-beanstalk-deploys/*"
]
]
The file is copied to the bucket using the aws s3 cp
command :
aws s3 cp --acl=public-read $RUN_ARTIFACT_PATH/app.zip s3://$BUCKET_NAME/$BUILDKITE_COMMIT.zip
Note the addition of the --acl=public-read
switch.
I have even configured the bucket to have full public access and tested this by downloading the manifest file in an anonymous browser session. Despite all of these permissions being available, I continue to get a Forbidden
error.
At this point, I'm out of ideas of what to try next.
amazon-web-services amazon-s3 amazon-elastic-beanstalk
amazon-web-services amazon-s3 amazon-elastic-beanstalk
edited Nov 11 at 23:48
asked Nov 11 at 23:34
Samuel
1,5861528
1,5861528
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254329%2felasticbeanstalk-create-application-version-fails-with-s3-forbidden-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254329%2felasticbeanstalk-create-application-version-fails-with-s3-forbidden-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown