amazon-web-services

S3 object url is not secure(ssl) when opened in browser

五迷三道 提交于 2021-02-10 09:28:55
问题 I am building a small REST API service to store and retrieve photos. For that, I am using S3 as following: public String upload(InputStream uploadedInputStream, Map<String, String> metadata, String group, String filename) { TransferManager tm = TransferManagerBuilder.standard() .withS3Client(amazonS3) .build(); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentType(metadata.get(Configuration.CONTENT_TYPE_METADATA_KEY)); // TODO: 26/06/20 Add content-type to

S3 object url is not secure(ssl) when opened in browser

大憨熊 提交于 2021-02-10 09:26:30
问题 I am building a small REST API service to store and retrieve photos. For that, I am using S3 as following: public String upload(InputStream uploadedInputStream, Map<String, String> metadata, String group, String filename) { TransferManager tm = TransferManagerBuilder.standard() .withS3Client(amazonS3) .build(); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentType(metadata.get(Configuration.CONTENT_TYPE_METADATA_KEY)); // TODO: 26/06/20 Add content-type to

S3 object url is not secure(ssl) when opened in browser

旧巷老猫 提交于 2021-02-10 09:25:34
问题 I am building a small REST API service to store and retrieve photos. For that, I am using S3 as following: public String upload(InputStream uploadedInputStream, Map<String, String> metadata, String group, String filename) { TransferManager tm = TransferManagerBuilder.standard() .withS3Client(amazonS3) .build(); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentType(metadata.get(Configuration.CONTENT_TYPE_METADATA_KEY)); // TODO: 26/06/20 Add content-type to

Is possible to use Amazon Elastic Beanstalk with SSL (HTTPS) without a Load Balancer?

别来无恙 提交于 2021-02-10 08:56:31
问题 From now on, my application needs a secure connection (HTTPS). I verify that most of tutorials for adding secure connections (https) on Amazon Web Services Elastic Beanstalk uses the Elastic Load Balancer as a tunnel. In my case I'm running a single instance, in fact I don't need a Load Balancer. How can I add a secure connection to my instance without a Elastic Load Balancer? Is that possible? I am using 64bit Amazon Linux 2017.03 v2.4.4 running PHP 7.0 Elastic Beanstalk. 回答1: That is

Restoring an Elastic Beanstalk RDS

强颜欢笑 提交于 2021-02-10 08:14:50
问题 When rebuilding an elastic beanstalk environment, EB automatically recreates a new and associated RDS instance. Once associated, RDS instances cannot be dissociated from an EB environment. I have a snapshot of the previous RDS prior to the rebuild. You cannot restore RDS snapshots to an existing RDS instance. How then, can I rebuild the environment with my desired snapshot attached? Or, how can I use my existing snapshot, or how can I migrate the existing snapshot data to the new database (I

Restoring an Elastic Beanstalk RDS

假装没事ソ 提交于 2021-02-10 08:09:52
问题 When rebuilding an elastic beanstalk environment, EB automatically recreates a new and associated RDS instance. Once associated, RDS instances cannot be dissociated from an EB environment. I have a snapshot of the previous RDS prior to the rebuild. You cannot restore RDS snapshots to an existing RDS instance. How then, can I rebuild the environment with my desired snapshot attached? Or, how can I use my existing snapshot, or how can I migrate the existing snapshot data to the new database (I

Restoring an Elastic Beanstalk RDS

邮差的信 提交于 2021-02-10 08:07:01
问题 When rebuilding an elastic beanstalk environment, EB automatically recreates a new and associated RDS instance. Once associated, RDS instances cannot be dissociated from an EB environment. I have a snapshot of the previous RDS prior to the rebuild. You cannot restore RDS snapshots to an existing RDS instance. How then, can I rebuild the environment with my desired snapshot attached? Or, how can I use my existing snapshot, or how can I migrate the existing snapshot data to the new database (I

Enable CORS in AWS API Gateway with aws-cli

梦想与她 提交于 2021-02-10 07:37:07
问题 I'm currently writing script to programmatically enable CORS once a resource is added to an API Endpoint on AWS API Gateway. After exploring the put-integration-response function for hours. I almost got a breakthrough, but here is an error I'm getting: An error occurred (BadRequestException) when calling the PutIntegrationResponse operation: Invalid mapping expression specified: Validation Result: warnings : [], errors : [No method response exists for method.] Here is the script I'm using to

How to get list of instances attached to ELB in form of comma separated list

瘦欲@ 提交于 2021-02-10 06:58:17
问题 I want to get list of all instances attached to an ELB (need to use them in further processing). Here is what I have done so far : aws elb describe-load-balancers --load-balancer-name 'my-elb' --output json --query "LoadBalancerDescriptions[*].Instances[*].InstanceId" However, above command gives me the list in JSON format. [ [ "i-05676776d8cd4ab5344b0d", "i-05676776" ] ] How can I do? Thanks! 回答1: --output text and pipe it to paste aws elb describe-load-balancers --load-balancer-name 'my-elb

API Gateway Websockets - Dealing with 10 minute idle connection timeout

廉价感情. 提交于 2021-02-10 06:44:19
问题 I have simple chatroom application and if no users send any messages, the websocket closes after about 10 minutes. What is the best solution to keep the connection alive without reconnecting? 回答1: It is always possible to send pings, the other side will have to reply with pong. (proof) This tutorial might help you with that. 来源: https://stackoverflow.com/questions/58401092/api-gateway-websockets-dealing-with-10-minute-idle-connection-timeout