FAQ

IndexTagsArchivesAbout
  • How to yum install Node.JS on Amazon Linux

    2022-02-14

    Question I've seen the writeup on using yum to install the dependencies, and then installing Node.JS & NPM from source. While this does work, I feel like Node.JS and NPM should both be in a public repo somewhere. How can I install Node.JS and NPM in one command on AWS Amazon Linux? Answer Stumbled onto this, was strangely hard to find again later. Putting here for posterity: sudo yum install nodejs npm --enablerepo=epel EDIT 3: As of July 2016, EDIT 1 no longer works for nodejs 4 (and EDIT 2 neither).…

    #node.js

  • Is there a way to list all resources in AWS

    2022-02-14

    Question Is there a way to list all resources in AWS? For all regions, all resources.. Such as list all EC2 instances, all VPCs, all APIs in API Gateway, etc... I would like to list all resources for my account, since it's hard for me to find which resources I can relinquish now. Answer Yes. Use the Tag Editor. Set "Regions" to "All Regions", "Resource Types" to "All supported resource types"…

    #amazon-web-services

  • Listing contents of a bucket with boto3

    2022-02-14

    Question How can I see what's inside a bucket in S3 with boto3? (i.e. do an "ls")? Doing the following: import boto3 s3 = boto3.resource('s3') my_bucket = s3.Bucket('some/path/') returns: s3.Bucket(name='some/path/') How do I see its contents? Answer One way to see the contents would be: for my_bucket_object in my_bucket.objects.all(): print(my_bucket_object)

    #python

  • Make a bucket public in Amazon S3

    2022-02-14

    Question How can I set a bucket in Amazon S3 so all the files are publicly read-only by default? Answer You can set a bucket policy as detailed in this blog post: http://ariejan.net/2010/12/24/public-readable-amazon-s3-bucket-policy/ As per @robbyt's suggestion, create a bucket policy with the following JSON: { "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPublicRead", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::bucket/*" ] } ] } Important: replace bucket in the Resource line with the name of your bucket.…

    #amazon-web-services

  • Open files always in a new tab

    2022-02-14

    Question I am using Visual Studio Code 1.3.1 with the newly introduced tabs. When I click on files, the first file will open in a tab. If I do not make any changes to this file, the second clicked file will open in the same tab. How can I avoid this and make Visual Studio Code always open a new tab? Answer When you [single-]click a file in the left sidebar's file browser or open it from the quick open menu (Ctrl-P, type the file name, Enter), Visual Studio Code opens it in what's called "…

    #visual-studio-code

  • Permission denied (publickey) when SSH Access to Amazon EC2 instance [closed]

    2022-02-14

    Question Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered. Closed 5 years ago.…

    #amazon-web-services

  • S3 - Access-Control-Allow-Origin Header

    2022-02-14

    Question Did anyone manage to add Access-Control-Allow-Origin to the response headers? What I need is something like this: <img src="http://360assets.s3.amazonaws.com/tours/8b16734d-336c-48c7-95c4-3a93fa023a57/1_AU_COM_180212_Areitbahn_Hahnkoplift_Bergstation.tiles/l2_f_0101.jpg" /> This get request should contain in the response, header, Access-Control-Allow-Origin: * My CORS settings for the bucket looks like this: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration> As you might expect there is no Origin response header. Answer S3 now expects the rules to be in Array Json format.…

    #amazon-web-services

  • «
  • 146
  • 147
  • 148
  • 149
  • 150
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^