amazon-s3

Added custom lambda layer caused SSL authorization error when calling AWS S3

ε祈祈猫儿з 提交于 2021-01-07 07:00:19
问题 I created a lambda layer for AWS lambda in Python 3.8, however, it is causing a SSL authorization error when calling S3 in my lambda function (even though no packages in the lambda layer are imported in the main lambda function) The following code succeeded when no lambda layer is added, but failed when added my custom lambda layer. import boto3 def lambda_handler(event, context): c1 = boto3.client("s3") lst = c1.list_buckets() print(lst) return { 'statusCode': 200, 'body': 'Hello from Lambda

NodeJS Knox Formidable results in a 400, File not Uploaded to S3 Bucket

梦想的初衷 提交于 2021-01-07 06:31:58
问题 I want to use formidable and knox to upload files to AWS S3 bucket, but I get a 400 each time and the file is not uploaded. My code is similar to this: nodejs knox put to s3 results in a 403, the only difference is that the first argument of my readFile is from my windows temp folder, I tried the solution in the comment by ensuring my bucket name is only small letters but this also did not work. Please help if you can, thank you. My codes are below: App.js const express = require("express"),

How do I set up an AWS S3 Object Redirect via the Java SDK

好久不见. 提交于 2021-01-07 05:48:29
问题 I'm asking this question in order to answer it and point others in the right direction faster then I got there. I spent far too long looking for the answer as most S3 Object Redirection questions and their answers had to do with the technical detail of confusing the S3 bucket access point for the S3 website access point. What, there's a different url? Yes -- See: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html Once you get past that the natural path seems to be trying to

How do I set up an AWS S3 Object Redirect via the Java SDK

a 夏天 提交于 2021-01-07 05:47:08
问题 I'm asking this question in order to answer it and point others in the right direction faster then I got there. I spent far too long looking for the answer as most S3 Object Redirection questions and their answers had to do with the technical detail of confusing the S3 bucket access point for the S3 website access point. What, there's a different url? Yes -- See: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html Once you get past that the natural path seems to be trying to

How to setup a maintenance page in Amazon CloudFront /S3

蓝咒 提交于 2021-01-07 03:43:15
问题 I'm using AWS S3 for front-end web hosting and AWS EC2 for back-end hosting. The EC2 instance is behind an elb and has scheduled maintenance, and I want to display a maintenance page when the EC2 instance is under maintenance. The way that I set it up is to let index.html "touch" some files on EC2, if the server is unavailable it will return HTTP 503 error. There is a 503.html in S3 and I want to display it when 503 error happens. I've tried creating a new CloudFront Error Page and creating

How to setup a maintenance page in Amazon CloudFront /S3

泄露秘密 提交于 2021-01-07 03:43:06
问题 I'm using AWS S3 for front-end web hosting and AWS EC2 for back-end hosting. The EC2 instance is behind an elb and has scheduled maintenance, and I want to display a maintenance page when the EC2 instance is under maintenance. The way that I set it up is to let index.html "touch" some files on EC2, if the server is unavailable it will return HTTP 503 error. There is a 503.html in S3 and I want to display it when 503 error happens. I've tried creating a new CloudFront Error Page and creating

How to setup a maintenance page in Amazon CloudFront /S3

可紊 提交于 2021-01-07 03:42:32
问题 I'm using AWS S3 for front-end web hosting and AWS EC2 for back-end hosting. The EC2 instance is behind an elb and has scheduled maintenance, and I want to display a maintenance page when the EC2 instance is under maintenance. The way that I set it up is to let index.html "touch" some files on EC2, if the server is unavailable it will return HTTP 503 error. There is a 503.html in S3 and I want to display it when 503 error happens. I've tried creating a new CloudFront Error Page and creating

AWS S3 403(Forbidden) Error in angular App during file Upload

北战南征 提交于 2021-01-07 02:36:13
问题 For my project, I have a requirement to upload pdf into the s3 bucket. So using a lambda function I create a pre-signed URL and using the url i use http post request to upload the file. Now, with the pre-signed link i received from the lambda function, it is possible to upload the file using POSTMAN without any, but in my angular Application, for some reason i get a 403(Forbidden) Error. Here are all my code: Lambda Function async function getSignedUrlForResume(fileName){ const

AWS S3 403(Forbidden) Error in angular App during file Upload

余生长醉 提交于 2021-01-07 02:35:08
问题 For my project, I have a requirement to upload pdf into the s3 bucket. So using a lambda function I create a pre-signed URL and using the url i use http post request to upload the file. Now, with the pre-signed link i received from the lambda function, it is possible to upload the file using POSTMAN without any, but in my angular Application, for some reason i get a 403(Forbidden) Error. Here are all my code: Lambda Function async function getSignedUrlForResume(fileName){ const

Why is delegation to Account not working when it is specified as a NotPrincipal in a Bucket policy with Deny effect?

吃可爱长大的小学妹 提交于 2021-01-07 02:35:07
问题 As per AWS documentation, When you use an AWS account identifier as the principal in a policy, you delegate authority to the account. This delegation works fine when an AWS account identifier is specified in the Principal element of an Allow statement of a Bucket policy. In this case, it is not required to specify the individual IAM users in the Principal element (Of course, there must be an IAM policy that grants the IAM users access to bucket). However, this delegation does not appear to