amazon-web-services

How to identify the storage class in Amazon S3?

天大地大妈咪最大 提交于 2021-02-16 16:27:07
问题 Suppose I have media assets stored in S3 Standard Storage . After 30 days it moved to S3 Standard-Infrequent Access Storage and after 90 days it is moved to Glacier by lifecycle policies that I configured. So at any point of time how can I identify where the object is stored? 回答1: The Storage Class of an object indicates where the data is "stored". For Standard and Standard-Infrequent Access (Standard-IA) , the object is kept as normal in Amazon S3. For Glacier , the object is still listed

API Gateway custom domain certificate error

£可爱£侵袭症+ 提交于 2021-02-16 16:08:28
问题 I'm trying to set up a regional API gateway with a custom domain, and I'm hitting a problem involving SSL certificates. Here's what I've done: Using ACM, created a certificate for vitalservices-3.docriot.com. In API Gateway, created a regional custom domain name--vitalservices-3.docriot.com--assigned the vitalservices-3.docriot.com certificate to it, and added a base path mapping from "/" to "vitalservices-3:prod". In the Route53 hosted zone for docriot.com, created a CNAME record mapping

Deploying Docker to AWS Elastic Beanstalk — how to forward port to host? (port binding)

旧街凉风 提交于 2021-02-16 14:56:46
问题 I have a project set up with CircleCI that I am using to auto-deploy to Elastic Beanstalk. My EBS environment is a single container, auto-scaling, web environment. I am trying to run a service that listens on raw socket port 8080. My Dockerfile: FROM golang:1.4.2 ... EXPOSE 8080 My Dockerrun.aws.json.template: { "AWSEBDockerrunVersion": "1", "Authentication": { "Bucket": "<bucket>", "Key": "<key>" }, "Image": { "Name": "project/hello:<TAG>", "Update": "true" }, "Ports": [ { "ContainerPort":

AWS API Gateway with Custom Authorizer and CORS Intermittent 200 then 403 then 200 … Strange

回眸只為那壹抹淺笑 提交于 2021-02-16 14:48:11
问题 I have an 1 Amazon Api Gateway setup with a custom authorizer (the authorizer basically just returns allow for anything) I enabled CORS, and this is running from jQuery webpage. I have two method /vehicles (returns a list of car) /bookings (returns booking details) The behavior I am seeing, is the first request goes fine, I see it pull the OPTIONS , then perform a GET request. Then , I hit the other method the OPTIONS works, then the get returns a 403 , but if I launch the request again ( On

How to workaround custom domain for private API gateway?

梦想与她 提交于 2021-02-16 04:51:52
问题 I know that custom domain names are not supported for private APIs. Also, similar question was answered here. Unlike the problem of ugly url as in question above, my problem is with format of private dns, which is as follows: https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage} The problem is that hostname is dynamic - RestapiId can change whenever CloudFormation stack is recreated. This recreation is done when CF stack is in rollback_complete state and can not be updated. Then I

How to workaround custom domain for private API gateway?

心不动则不痛 提交于 2021-02-16 04:51:35
问题 I know that custom domain names are not supported for private APIs. Also, similar question was answered here. Unlike the problem of ugly url as in question above, my problem is with format of private dns, which is as follows: https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage} The problem is that hostname is dynamic - RestapiId can change whenever CloudFormation stack is recreated. This recreation is done when CF stack is in rollback_complete state and can not be updated. Then I

S3 permissions required to get bucket size?

元气小坏坏 提交于 2021-02-13 17:41:09
问题 I'm using boto3 to get the size of all objects in S3 and have granted the following permissions: s3:ListAllMyBuckets s3:ListObjects s3:GetObject However boto keeps throwing this error: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied I couldn't find any details in the docs or by looking at the source code for boto... does anyone know th e minimum permissions necessary just to get the size of all objects in an S3 bucket? 回答1: I created the following lambda

S3 permissions required to get bucket size?

帅比萌擦擦* 提交于 2021-02-13 17:40:40
问题 I'm using boto3 to get the size of all objects in S3 and have granted the following permissions: s3:ListAllMyBuckets s3:ListObjects s3:GetObject However boto keeps throwing this error: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied I couldn't find any details in the docs or by looking at the source code for boto... does anyone know th e minimum permissions necessary just to get the size of all objects in an S3 bucket? 回答1: I created the following lambda

S3 permissions required to get bucket size?

做~自己de王妃 提交于 2021-02-13 17:39:01
问题 I'm using boto3 to get the size of all objects in S3 and have granted the following permissions: s3:ListAllMyBuckets s3:ListObjects s3:GetObject However boto keeps throwing this error: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied I couldn't find any details in the docs or by looking at the source code for boto... does anyone know th e minimum permissions necessary just to get the size of all objects in an S3 bucket? 回答1: I created the following lambda

Unit tests panic when returning dereferenced struct attribute rather than struct

偶尔善良 提交于 2021-02-11 18:24:40
问题 How does one go about testing a function that is returning a struct attribute that is of type string or number, rather than the struct itself? I am trying to test the Lambda Code block with the Test Code block. In Lambda Code block below, I am returning *resp.UserPoolClient.ClientSecret which dereferences to a string , rather than the *string . When I run my test, I believe I get a panic error as *resp.UserPoolClient.ClientSecret is nil in the debugger. Is my returning of the de-referenced