Git Product home page Git Product logo

Comments (12)

santiagocardenas avatar santiagocardenas commented on June 10, 2024

Make sure that the bucket you created is in a region that supports AWS API Signature Version 2.

These are regions that are not in the list here: https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html

The reason for this is that there is a limitation with cfn-init and downloading files from virtual hosted-style S3 Bucket URLs.

from quickstart-linux-bastion.

santiagocardenas avatar santiagocardenas commented on June 10, 2024

Btw, it seems though that my note above isn't affecting your use case.

To confirm, do you see the file at /tmp/bastion_bootstrap.sh and are the contents of that file the actual bootstrap script?

from quickstart-linux-bastion.

santiagocardenas avatar santiagocardenas commented on June 10, 2024

Also, what happens if you try launching from the quickstart-reference bucket as the value of Quick Start S3 Bucket Name (QSS3BucketName)?

from quickstart-linux-bastion.

ritwik-singh-yash avatar ritwik-singh-yash commented on June 10, 2024

I am launching my stack in North Virginia region.
The bastion_bootstrap.sh is being copied in the tmp folder and has the actual content.
When I use the actual template with quickstart buckets it works fine, which baffles me more.

from quickstart-linux-bastion.

ritwik-singh-yash avatar ritwik-singh-yash commented on June 10, 2024

I have a question. The bucket from where i am pulling the bastion_bootstrap.sh gives does not give me the file link which is formed in the template i.e.
"https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/bastion_bootstrap.sh",
It is like : https://s3.amazonaws.com/${QSS3BucketName}/${QSS3KeyPrefix}/bastion_bootstrap.sh.
Does this make any difference?
Although testing with the actual link also gives me the same error.

from quickstart-linux-bastion.

santiagocardenas avatar santiagocardenas commented on June 10, 2024

This is interesting. I've tried it with every Linux OS supported in the Quick Start and it deploys as expected. When copying, did you make any modifications? What Linux OS were you using?

From the log you attached, it seems that the issue happens when executing the bootstrap script command, as seen by the following line:
2018-01-08 11:29:16,605 [DEBUG] Command b-bootstrap output: /bin/sh: ./tmp/bastion_bootstrap.sh: No such file or directory

from quickstart-linux-bastion.

santiagocardenas avatar santiagocardenas commented on June 10, 2024

In regard to the difference is URL, it's just virtual hosted-style vs. path-style S3 URLs. You can see more info here: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html

The advantage (in this case) of using virtual hosted-style is that you can use a single s3.amazonaws.com URL for any bucket located in any region. Path style URLs require a different S3 URL for every region and you must know that region ahead of time.

from quickstart-linux-bastion.

ritwik-singh-yash avatar ritwik-singh-yash commented on June 10, 2024

I have actually made some change to the template but not to the script.
In the template I am trying to copy files from one of my buckets into another bucket using user data.
But there has been no change in the bootstrap file configuration.
I am using amazon linux as of now and have not tested it on any other OS.
Another thing that is bugging me that even when i try to execute that script manually it fails with a validation error. I have tried changing its permission and mode but to no avail.
gitCopy.txt

from quickstart-linux-bastion.

santiagocardenas avatar santiagocardenas commented on June 10, 2024

Can you run the Quick Start from the published location as is (that is, without your changes)?
This would help us narrow down if it's because of changes introduced that should be diffed.

from quickstart-linux-bastion.

andrew-glenn avatar andrew-glenn commented on June 10, 2024

@ritwik-singh-yash Is this issue still on-going? What were your results?

from quickstart-linux-bastion.

ritwik-singh-yash avatar ritwik-singh-yash commented on June 10, 2024

I had created some workaround for that, just for my use case but there is one potential solution from AWS which I have not tested but should work according to the AWS support team.
"In order to point the template at your own bucket, you'll need to place the file in a particular folder structure. In your bucket, create a folder called "linux", then inside this folder create another folder called "scripts". Place your copy of the bastion_bootstrap.sh file inside these folders. Your file path should then look like this: my-bucket/linux/scripts/bastion_bootstrap.sh"
As AWS quickstarts are tightly coupled these intricate details need to be taken care of.

from quickstart-linux-bastion.

andrew-glenn avatar andrew-glenn commented on June 10, 2024

Glad to see you're operational and found a solution. The vanilla templates (in master) allow you to customize the bucket and key-prefix (linux directory in your example) via the QSS3Bucket and QSS3KeyPrefix parameters, respectfully.

from quickstart-linux-bastion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.