Commit Graph

5551 Commits

Author SHA1 Message Date
Steve Pulec
0317602ae5
Merge pull request #3247 from kam193/fix/lambda_default_envs
Set lambda credentials' variables in runtime
2020-08-24 21:36:33 -05:00
Kamil Mankowski (kam193)
6ec7c4faa4
Lower docker package in Travis 2020-08-20 09:02:57 +02:00
Kamil Mankowski (kam193)
c917ac6ecb
Set more lambda runtime variables 2020-08-19 23:18:32 +02:00
Bert Blommers
0f6e5a1b0e
Merge pull request #55 from spulec/master
Merge upstream
2020-08-07 13:42:09 +01:00
usmangani1
9894e1785a
Enhancement : Ec2 - Add describe-vpc-endpoint-services method support. (#3108)
* Enhancement : Ec2 - Add describe-vpc-endpoint-services method support.

* Fix:EC2-describe_vpc_endPoint_services changed the template

* Fixed comments

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-06 06:26:44 +01:00
usmangani1
a7ddcd7da3
Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges (#3196)
* Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges

* Fix:EC2-authorize_security_group_ingress- add test when description is not present.

* part commit

* Fix:fixed build errors

* Linting

* Allow for Python2 string/unicodes

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-04 06:50:57 +01:00
jweite
da07adae52
* Support for CloudFormation update and delete of Kinesis Streams (#3212)
* Support for CloudFormation stack resource deletion via backend resource method
  delete_from_cloudformation_json() via parse_and_delete_resource().
* Correction to the inappropriate inclusion of EndingSequenceNumber in open shards.
  This attribute should only appear in closed shards.  This regretfully prevents
  confirmation of consistent record counts after split/merge in unit tests.
* Added parameters/decorator to CloudFormationModel method declarations to calm-down Pycharm.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-03 16:04:05 +01:00
Yuuki Takahashi
99736c3101
fix clear pending messages when call purge_queue (#3208) 2020-08-03 15:09:25 +01:00
Ninh Khong
061c609a8f
Fix secretsmanager random password wrong length (#3213)
* Enhance function get_parameter by parameter name, version or labels

* Fix random password with exclude characters return wrong length
2020-08-03 13:42:42 +01:00
Anton Grübel
252d679b27
Organizations - implement Policy Type functionality (#3207)
* Add organizations.enable_policy_type

* Add organizations.disable_policy_type

* Add support for AISERVICES_OPT_OUT_POLICY
2020-08-02 10:56:19 +01:00
jweite
3342d49a43
S3 cloudformation update (#3199)
* First cut of S3 Cloudformation Update support: encryption property.

* Update type support for S3.  Abstract base class for CloudFormation-aware models, as designed by @bblommers, introduced to decentralize CloudFormation resource and name property values to model objects.

* Blackened...

* Un-renamed param in s3.models.update_from_cloudformation_json() and its call to stay compatible with other modules.

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 22:43:03 +01:00
Bert Blommers
a3cd699af8
Merge pull request #54 from spulec/master
Merge upstream
2020-08-01 19:49:04 +01:00
Larry Aiello
06ed67a8e5
Implement UserIds for Snapshot Attributes (#3192)
* implement register_image

* format code

* add user_ids to snapshot model

* implement register_image

* format code

* add user_ids to snapshot model

* trying to un-deprecate tests

* Write tests and finalize implementation

* Add region parameter to boto3 resource call

* fixed test error
2020-08-01 17:03:54 +01:00
Adam Richie-Halford
9a9a1d8413
Decentralize cloudformation naming responsibilities (#3201)
* #3127 - Decentralize CF naming responsibilities

* Decentralize CloudFormation naming responsibilities

* Update URLs in cloudformation_resource_type functions

* Fix flake8 errors

* Black formatting

* Add a bunch of imports to populate CloudFormationModel.__subclasses__

* Add noqa to s3 models import statement in cloudformation/parsing.py

* Black formatting

* Remove debugging print statement

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 15:23:36 +01:00
Iain Bullard
88a1134657
Fix DynamoDb2 ExpressionAttributeNames can start with a number (#3206)
When using pynamodb's support for transactions it makes use of of
ExpressionAttributeNames that look like #0 #1 etc. According to

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html

And when testing against dynamodb-local these work without issue,
however, when testing with moto they fail.
2020-07-31 17:46:48 +01:00
Anton Grübel
8162947ebb
Organizations - implement Delegated Administrator functionality (#3200)
* Add organizations.register_delegated_administrator

* Add organizations.list_delegated_administrators

* Add organizations.list_delegated_services_for_account

* Add organizations.deregister_delegated_administrator

* Fix Python2 incompatibility
2020-07-31 16:32:57 +01:00
Chris Kilding
943ecb7ea7
Support --filters option in secretsmanager:ListSecrets (#3173)
* Feature: Support --filters opton in secretsmanager:ListSecrets

* Implement some of the secret filters

* Check listSecrets filters combine with an implicit AND operator

* Test all filter and multi-value filter and multi-word filter

* Fix matcher behavior, restructure code

* Implement remaining listSecrets filter cases

* Linter fixes

* Use contains-in-any-order assertions for test_list_secrets

* Linter fix again

* Attempt Python 2 fix for assert_items_equal

* Remove docstrings from test_list_secrets tests as they make the test reports weird

* Test and handle listSecrets filter with no values
2020-07-31 15:31:18 +01:00
Bert Blommers
368fe4cbe6
Merge pull request #53 from spulec/master
Merge upstream
2020-07-31 10:20:06 +01:00
Anton Grübel
a9ac09952b
Fix resource groups tests (#3204) 2020-07-31 07:18:52 +01:00
Matt Williams
50d71eccbe
Fix XML schema for ec2.describe_instance_types (#3194)
* Add test for describe_instance_types

It currently fails due to an invalid XML schema

* Add more detail to test

* Fix the XML schema for describe_instance_types
2020-07-29 18:36:37 +01:00
Waldemar Hummer
08a08b6af8
Fix SQS tag list from CloudFormation resource creation (#3197)
* fix sqs tag list from cloudformation resource creation

the method `create_from_cloudformation_json` of the Sqs resource
does not handle the difference of format of the Tags field in the
resource template and the format expected in Sqs resource class.

In cfn resource template Tags is specified as a list of dicts. But
the Sqs resource expects that the tags field be a single dict.
This behaviour causes a crash when a queue is created with tags
from `create_from_cloudformation_json` and later the list_queue_tags
is called because it tries to call `items` from `queue.tags` but
tags is actually a list of dicts.

* fix comment

* fix linter

* minor

Co-authored-by: Hudo Assenco <hudo.assenco@gmail.com>
2020-07-29 11:44:02 +01:00
jweite
736c8b77ce
Fixed Failures in CloudFormation Provisioning of S3 Buckets When Stack has Long Name... (#3169)
* Fixed defect with CloudFormation provisioning of S3 buckets occuring when stack has a long name, resulting in the default S3 bucket name's length exceeding its 63 char limit.

* PR 3169 July 23, 2020 2:57a ET comment: added additional asserts to assure provisioned bucket's name complies.  Fixed bug in my earlier change that could produce default bucket names with illegal upper-case characters in it.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-29 07:47:18 +01:00
Ninh Khong
ff1f565142
Enhance function get_parameter by parameter name, version or labels (#3191)
Co-authored-by: Ninh Khong <ninh@1on1english.vn>
2020-07-28 16:59:22 +01:00
Jordan Reiter
28d1d762af
Enforce parameter naming (#3190)
* Enforce parameter naming

Parameters are not allowed to start with `ssm` or `aws`. This commit adds error messages which
correspond exactly to the error messages returned by boto3.

* Fix for Python 2 compatibility

f-strings not supported in Python 2.7
2020-07-28 15:26:59 +01:00
Ninh Khong
97139d4253
Fix : SQS - Added support for attribute labels for send_message function (#3181)
* Fix : SQS - Added support for attribute labels for send_message function

* Add integration test on receive message function

* Add send message invalid datetype integration test and fix SQS MessageAttributesInvalid exceptions
2020-07-28 14:34:26 +01:00
Jordan Reiter
126f5a5155
Implement Filter: Contains functionality for describe_params (#3189)
* Implement Filter: Contains functionality for describe_params

This commit adds the Contains functionality. Tests were created
to mimic behavior in AWS/boto3, including that filters with values
in the form of `/name` will match parameters named `/name/match` but
not parameters named `match/with/other-name`. In the test example, a
Contains filter with the value `/tan` would match: `/tangent-3` and
`tangram-4` but not `standby-5`.

* Enforce parameter filter restrictions on get_parameters_by_path

According to the boto3 documentation [1], `Name`, `Path`, and `Tier` are not
allowed values for `Key` in a parameter filter for `get_parameters_by_path`.

This commit enforces this by calling `_validate_parameter_filters` from the
`get_parameters_by_path` method, and adding a check to `_validate_parameter_filters`.

I added 3 test cases to `test_get_parameters_by_path` which check for the correct
exception when calling with a parameter filter using any of these keys.

* Code formatted to match style

* Refactored logic
2020-07-28 10:17:35 +01:00
Macwan Nevil
6adee0cbaf
Bugfix: RedrivePolicy Issue SNS (#3186)
* Bugfix: S3 time precision issue fixed

* Bugfix: S3 time precision issue fixed

* s3 timeformat fix

* Quickfix S3 timefix

* Bugfix: Redrive Policy Allow

* Linting Fixed
2020-07-27 18:53:15 +01:00
usmangani1
1db42fb865
FIX : IAM - Added support for pathPrefix in list_users_function (#3180)
* FIX:IAM-Added support for pathPrefix in list_users_function

* removed changes for roles

* Added test for non decorator

* changed filter function

Co-authored-by: usmankb <usman@krazybee.com>
2020-07-27 15:32:41 +01:00
usmangani1
bc1674cb19
CF : Added support for get template summary (#3179)
* CF : Added support for get template summary

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-27 14:08:01 +01:00
Bert Blommers
03dd55d39d
Organisations - Put back assertions that got lost in a merge (#3184) 2020-07-27 12:36:31 +01:00
Hector Acosta
cdc4385e2a
Various changes to organizations endpoint (#3175)
* Raise DuplicatePolicyException when a policy with the same name exists

* Implement update_policy

* Implement delete_policy
2020-07-27 12:32:11 +01:00
Steve Pulec
1eda31cb76
Merge pull request #2939 from redyvon/master
Update Dockerfile
2020-07-26 15:35:42 -05:00
Steve Pulec
ebae2b1799
Merge pull request #3156 from bblommers/bug/3150
AWS Lambda - Verify Docker is running when executing a Function
2020-07-26 15:32:11 -05:00
Steve Pulec
41427a78b6
Merge pull request #3147 from bblommers/enhancement/3139
ECS - UpdateService - Allow service ARN to be passed in
2020-07-26 15:31:12 -05:00
Steve Pulec
7481d07a3d
Merge pull request #3119 from bblommers/bugfix/dynamodb_table_cfn_output
CFN - Allow DynamoDB table as an Output
2020-07-26 15:30:29 -05:00
Steve Pulec
980525c3dd
Merge pull request #3121 from bblommers/bugfix/2104
S3 - Persist metadata for Presigned URL
2020-07-26 15:29:38 -05:00
Macwan Nevil
c166d97a97
Bugfix: S3 time precision issue fixed (#3182)
* Bugfix: S3 time precision issue fixed

* Bugfix: S3 time precision issue fixed

* s3 timeformat fix

* Quickfix S3 timefix
2020-07-26 16:00:15 +01:00
Larry Aiello
2504a398f9
Implement ec2.register_image() (#3177)
* implement register_image

* format code
2020-07-26 13:51:26 +01:00
Dean Kleissas
936c7c80f1
When generating multi-part upload IDs remove / characters (#3164)
* / are not allowed in upload ids

* ran black
2020-07-22 17:01:31 +01:00
Koichi Ogura
448ff45174
fix cognito-idp UserPool ClientId (#3165)
* fix cognito-idp UserPool ClientId

* add test

* replace uuid4 to create_id
2020-07-22 14:08:17 +01:00
ryanlchandler
bf8eb11dc3
Adding MessageGroupId and MessageDeduplicationId (#3163)
Adding MessageGroupId and MessageDeduplicationId when sent from batch (#3101)
2020-07-22 13:09:12 +01:00
Alan Baldwin
b09c8034e6
Adding VPN Gateway filters (#3155)
* Adding attchment.vpc-id, attachment.state, type, and vpn-gateway-id filters for VPN Gateways. fixes #3154

* Run formatting on tests

Co-authored-by: Alan Baldwin <alan.baldwin.jr@gmail.com>
2020-07-21 16:08:49 +01:00
Anton Grübel
a507314d45
RAM - implement CRUD endpoints (#3158)
* Add ram.create_resource_share

* Add ram.get_resource_shares

* Add ram.update_resource_share

* Add ram.delete_resource_share

* Add ram.enable_sharing_with_aws_organization

* Fix server tests

* Add CR suggestions
2020-07-21 14:15:13 +01:00
Aaron Hill
1e5b8acac6
Implementation: ECS Task Sets (#3152)
* initial implementation of taskSets.  Fixed a bug with ECS Service where task_definition was a required parameter.

* Added update_task_set and tests.  DRYed up ClusterNotFoundException. General cleanup.

* Added support for filtering tags on include parameter to describe_task_sets.  Added additional tests.

* Fix copy/pasta in ClusterNotFoundException

* styling updates

* Added TODO for delete_task_set force parameter

* Updated multiple function and constructor calls to use named variables.  Updated tests to reference variables instead of hardcoded strings.

* Run black for formatting

* Updated create_service function call to use named variables
2020-07-21 07:17:37 +01:00
cm-iwata
fdeee07762
Add basic implement for cognito-idp create_resource_server (#3153)
* Add basic implement for cognito-idp create_resource_server

* lint
2020-07-20 12:31:30 +01:00
Bert Blommers
f2f25060fe #3150 - AWSLambda - Verify Docker is running 2020-07-20 11:37:45 +01:00
jweite
ba99c61477
Basic Support for Endpoints, EndpointConfigs and TrainingJobs (#3142)
* Basic upport for Endpoints, EndpointConfigs and TrainingJobs

* Dropped extraneous pass statement.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-19 15:06:48 +01:00
usmangani1
a123a22eeb
Fix : cloudFormation dynamodb : delete resource on delete stack (#3120)
* Fix :  cloudFormation dynamodb : delete resource on delete stack

* Delete function for dynamodb

* Added tests for delete stack using dynamodb.

* Added tests for non decorator

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-19 11:59:19 +01:00
usmangani1
552b1294df
Fix : EC2 - Added ownerId filter for describe instances (#3149)
* Fix : EC2 - Added ownerId filter for describe instances

* linting
2020-07-19 10:44:58 +01:00
Logan Jones
6fb7867767
Fix: Put Events API (#3145)
* Fix: Put Events API

* Update from code review.

Co-authored-by: Logan Asher Jones <logan@codescratch.com>
2020-07-19 10:00:24 +01:00