amazon-web-services

How can I download a file from S3 via Powershell without installing AWS SDK?

删除回忆录丶 提交于 2021-02-19 08:14:13
问题 I want to download a file from my AWS S3 bucket using Windows Powershell. I cannot install any AWS software and need to create an API to be able to access a file in AWS S3. I used Postman for testing that the file is accessible and it was successful. Given this success I tried following AWS' guide which says that I need to create the following: Create a canonical request. Use the canonical request and additional metadata to create a string for signing. Derive a signing key from your AWS

Scikit-learn machine learning models training using multiple CPUs

允我心安 提交于 2021-02-19 06:50:13
问题 I want to decrease training time of my models by using a high end EC2 instance. So I tried c5.18xlarge instance with 2 CPUs and run a few models with parameter n_jobs=-1 but I noticed that only one CPU was utilized: Can I somehow make Scikit-learn to use all CPUs? 回答1: Try adding: import multiprocessing multiprocessing.set_start_method('forkserver') at the top of your code, before running or importing anything. That's a well-known issue with multiprocessing in python. 来源: https:/

Partitioning Athena Tables from Glue Cloudformation template

风格不统一 提交于 2021-02-19 06:28:26
问题 Using AWS::Glue::Table, you can set up an Athena table like here. Athena supports partitioning data based on folder structure in S3. I would like to partition my Athena table from my Glue template. From AWS Glue Table TableInput, it appears that I can use PartitionKeys to partition my data, but when I try to use the below template, Athena fails and can't get any data. Resources: ... MyGlueTable: Type: AWS::Glue::Table Properties: DatabaseName: !Ref MyGlueDatabase CatalogId: !Ref AWS:

Triggering a lambda from SNS using cloud-formation?

可紊 提交于 2021-02-19 06:16:05
问题 Triggering a lambda from SNS using cloud-formation? 回答1: What we do is that we don't point sns to an unqualified lambda, rather we point it to a lambda-alias. Basically, create a lambda, and then create an alias, use sns to point to the lambda-alias. When you have new code for lambda (your ci/cd can do the following), update lambda function code, create a new lambda version, and repoint your alias to the new version. This way you sns doesn't have to change at all with new lambda code drops.

How to Encrypt and upload data using selling-partner-api in Amzon using .net

谁说胖子不能爱 提交于 2021-02-19 06:09:09
问题 I want to use selling-partner-api-docs for .Net . I found one reference from below url but that is use Java example coding : https://github.com/amzn/selling-partner-api-docs/blob/main/guides/use-case-guides/feeds-api-use-case-guide-2020-09-04.md#step-2-encrypt-and-upload-the-feed-data But i want to use .Net coding can any one suggest of .Net coding of below java coding part import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io

How to Encrypt and upload data using selling-partner-api in Amzon using .net

拟墨画扇 提交于 2021-02-19 06:05:06
问题 I want to use selling-partner-api-docs for .Net . I found one reference from below url but that is use Java example coding : https://github.com/amzn/selling-partner-api-docs/blob/main/guides/use-case-guides/feeds-api-use-case-guide-2020-09-04.md#step-2-encrypt-and-upload-the-feed-data But i want to use .Net coding can any one suggest of .Net coding of below java coding part import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io

How to access the raw query string (or full URL) in a Chalice (AWS Lambda/API Gateway) app?

烈酒焚心 提交于 2021-02-19 06:01:34
问题 I'm using Chalice to build a fairly straightforward API on AWS Lambda & API Gateway. I need a way to get access to the raw query string (i.e foo=bar&abc=123 ). When accessing the app.current_request.query_params dictionary, it's already been processed, such that any empty parameters ( foo=&bar= ) have been stripped out. Unfortunately I'm working with a third-party API that sends a signed hash value in the query string, based off the raw query string. I can't verify it without the original,

HTTPS/SSL Issues on AWS Elastic Beanstalk Multicontainer Docker Configuration

橙三吉。 提交于 2021-02-19 05:57:21
问题 I have this Multidocker configuration, my HTTP traffic works fine no any problems, however, I get 408 every time I try to use https { "AWSEBDockerrunVersion": 2, "containerDefinitions": [ { "name": "users-managment", "image": "....", "essential": true, "memory": 256, "portMappings": [ { "hostPort": 3000, "containerPort": 3000 } ], "environment": [ { "name": "PORT", "value": "3000" } ], "mountPoints": [] }, { "name": "presence", "image": "...ecr", "essential": true, "memory": 256,

AWS lambda send partial response

亡梦爱人 提交于 2021-02-19 05:55:10
问题 I have a lambda function which does a series of actions. I have a react application which triggers the lambda function. Is there a way I can send a partial response from the lambda function after each action is complete. const testFunction = (event, context, callback) => { let partialResponse1 = await action1(event); // send partial response to client let partialResponse2 = await action2(partialResponse1); // send partial response to client let partialResponse3 = await action3

AWS Fargate connection to RDS in a different VPC

被刻印的时光 ゝ 提交于 2021-02-19 05:40:48
问题 I have following setup: ECS (Fargate) cluster in VPC-1 RDS in VPC-2 My application running in ECS uses DNS name to connect to RDS however instead of private IP DNS resolves public IP address. In RDS I want to configure strict security rules to prevent connections from the outside world - I would like to limit it to only accept connections from VPC-1. I tried following things: peering both VPC-1 and VPC-2 - doesn't help, app running in ECS still resolves public IP routing all outbound traffic