amazon-web-services

AWS EC2 User Data script to allocate Elastic IP

╄→尐↘猪︶ㄣ 提交于 2021-02-19 05:31:39
问题 I am attempting to create my own bastion host for a VPC, and created an auto-scaling group with min/max instances of 1. In my launch configurations, I specify the following for the ec2 user data: #! INSTANCE_ID=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/instance-id` aws ec2 associate-address --instance-id $INSTANCE_ID --allocation-id eipalloc-my-eip-id --allow-reassociation The goal of this user data is to immediately associate an Elastic IP address with my newly created EC2

AWS EC2 User Data script to allocate Elastic IP

梦想的初衷 提交于 2021-02-19 05:30:08
问题 I am attempting to create my own bastion host for a VPC, and created an auto-scaling group with min/max instances of 1. In my launch configurations, I specify the following for the ec2 user data: #! INSTANCE_ID=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/instance-id` aws ec2 associate-address --instance-id $INSTANCE_ID --allocation-id eipalloc-my-eip-id --allow-reassociation The goal of this user data is to immediately associate an Elastic IP address with my newly created EC2

AWS lambda read parameter or outputs from CloudFormation

故事扮演 提交于 2021-02-19 04:53:45
问题 Looks as really simple task but it's difficult to find good example on it. So, the task is following: AWS lambda puts some message to AWS-SQS. Code of AWS lambda contains such line: var QUEUE_URL = 'https://sqs.us-west-2.amazonaws.com/ID/QUEUE_NAME';", In order to get rid of this code there are possible two options: Create query that will lookup this queue based on region and queue name SQS has predictable names; Create Cloud Formaion script and specify these dependencies there. Based on this

Athena can only see the first JSON record written to Firehose by Kinesis Analytics

为君一笑 提交于 2021-02-19 03:53:25
问题 I am using Kinesis Analytics to read in JSON from Kinesis Firehose. I am successfully filtering out some of the records and writing a subset of the JSON properties to another Firehose. I wanted to execute an Athena query on the data being written to S3 via the destination Firehose. However, the JSON records written to the files in S3 do not have any newlines. Consequently, when I query the data using Athena, it only returns the first record in each file. When I write records to the source

DynamoDB Mapper annotation for Object which has list of another object

廉价感情. 提交于 2021-02-19 03:52:52
问题 I am trying to create a dynamoDBMapper annotation for the below case. I have EmployeeLevelTrail which is a class of a Employee level record @DynamoDBTable(tableName = TABLE_NAME) public class EmployeeData { public final static String TABLE_NAME = “EmployeeDataRecord”; @DynamoDBAttribute(attributeName = “employeeID”) public String EmployeeID; @DynamoDBAttribute(attributeName = “EmployeeLevelDataRecords”) @DynamoDBTyped(DynamoDBMapperFieldModel.DynamoDBAttributeType.M) public EmployeeLevelTrail

DynamoDB Mapper annotation for Object which has list of another object

て烟熏妆下的殇ゞ 提交于 2021-02-19 03:52:22
问题 I am trying to create a dynamoDBMapper annotation for the below case. I have EmployeeLevelTrail which is a class of a Employee level record @DynamoDBTable(tableName = TABLE_NAME) public class EmployeeData { public final static String TABLE_NAME = “EmployeeDataRecord”; @DynamoDBAttribute(attributeName = “employeeID”) public String EmployeeID; @DynamoDBAttribute(attributeName = “EmployeeLevelDataRecords”) @DynamoDBTyped(DynamoDBMapperFieldModel.DynamoDBAttributeType.M) public EmployeeLevelTrail

How to use multiple Cognito user pools for a single endpoint with AWS API Gateway?

空扰寡人 提交于 2021-02-19 03:41:54
问题 I've recently implemented an API Gateway as a proxy with a single proxy endpoint. I'm using Cognito as authorisation mechanism and as long as I have only one user pool everything is fine. What I am trying to achieve is to be able to allow users from different user pools, but in the AWS Console I just seem to be able to select one Cognito mechanism which is only one user pool. Is there a way to allow multiple user pool through another mean ? Is there an alternative best practice for this

Aurora Serverless password rotation setup using CloudFormation (and Lambda rotation templates)

杀马特。学长 韩版系。学妹 提交于 2021-02-19 03:20:00
问题 AWS has Fully Configured and Ready-to-Use Rotation Support for some supported RDS engines, including Amazon Aurora (Serverless also?) I'm trying to setup the password rotation in my CloudFormation template using AWS::SecretsManager::RotationSchedule (note that this is not a fully functional template, only an illustration): DBCluster: Type: AWS::RDS::DBCluster Properties: Engine : aurora EngineMode : serverless EngineVersion : 5.6.10a Secret: Type: AWS::SecretsManager::Secret Properties:

How to get AWSCredentials given a AWS Cognito access_token

不打扰是莪最后的温柔 提交于 2021-02-19 03:08:47
问题 In an android app, I receive a JWT access_token from http://<domain>.auth.<region>.amazoncognito.com/login once the user is done authenticating to a Cognito User Pool. That User Pool is linked to a Cognito Identity Pool. What API should I call with that access_token to get an AWSCredentials object. The closest one I found would be AssumeRoleWithWebIdentity, but that is an STS API, and some of what I've read on the web seems to recommend developers not use STS directly but rely on Cognito.

How to get AWSCredentials given a AWS Cognito access_token

我的梦境 提交于 2021-02-19 03:08:38
问题 In an android app, I receive a JWT access_token from http://<domain>.auth.<region>.amazoncognito.com/login once the user is done authenticating to a Cognito User Pool. That User Pool is linked to a Cognito Identity Pool. What API should I call with that access_token to get an AWSCredentials object. The closest one I found would be AssumeRoleWithWebIdentity, but that is an STS API, and some of what I've read on the web seems to recommend developers not use STS directly but rely on Cognito.